svn commit: trunk/busybox/archival

aldot at busybox.net aldot at busybox.net
Mon Mar 19 13:44:18 UTC 2007


Author: aldot
Date: 2007-03-19 06:44:18 -0700 (Mon, 19 Mar 2007)
New Revision: 18158

Log:
Kim B. Heino writes:
When installing a new package with dpkg dependencies are checked 
correctly. But when I try to update an existing package, the 
dependencies are checked against the old package, not against new 
package. Thus the new package can break dependencies.


Modified:
   trunk/busybox/archival/dpkg.c


Changeset:
Modified: trunk/busybox/archival/dpkg.c
===================================================================
--- trunk/busybox/archival/dpkg.c	2007-03-19 10:49:11 UTC (rev 18157)
+++ trunk/busybox/archival/dpkg.c	2007-03-19 13:44:18 UTC (rev 18158)
@@ -643,11 +643,9 @@
 		return -1;
 	}
 	num = search_package_hashtable(new_node->name, new_node->version, VER_EQUAL);
-	if (package_hashtable[num] == NULL) {
-		package_hashtable[num] = new_node;
-	} else {
-		free_package(new_node);
-	}
+	if (package_hashtable[num] != NULL)
+		free_package(package_hashtable[num]);
+	package_hashtable[num] = new_node;
 	return num;
 }
 




More information about the busybox-cvs mailing list