Kim B. Heino writes:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 19 Mar 2007 13:44:18 +0000 (13:44 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 19 Mar 2007 13:44:18 +0000 (13:44 -0000)
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.

archival/dpkg.c

index 9f7818ccf524b170cdd844fde169079e7f2f531f..ebdf6c68a1ceab8d163c8782490603e519932ada 100644 (file)
@@ -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;
 }