From: Bernhard Reutner-Fischer Date: Mon, 19 Mar 2007 13:44:18 +0000 (-0000) Subject: Kim B. Heino writes: X-Git-Tag: 1_5_1~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=de8a6a01d84ebb09a333104bf0fd5f6e251d9eb7;p=oweals%2Fbusybox.git 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. --- diff --git a/archival/dpkg.c b/archival/dpkg.c index 9f7818ccf..ebdf6c68a 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c @@ -643,11 +643,9 @@ static unsigned fill_package_struct(char *control_buffer) 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; }