瀏覽代碼

dpkg: Take arch into account in virtual packages on remove and configure

The architecture restrictions were not being considered on package
configuration and removal, which would cause a system to end up in
broken states. Refuse to get into those states.

Closes: #683411
Guillem Jover 14 年之前
父節點
當前提交
0012c303da
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 2 0
      debian/changelog
  2. 5 0
      src/packages.c

+ 2 - 0
debian/changelog

@@ -47,6 +47,8 @@ dpkg (1.16.9) UNRELEASED; urgency=low
   * Clarify that the most probable reason for multiarch database
     inconcistencies is due to upgrades from unofficial dpkg versions.
   * Only satisfy a dependency on a “Multi-Arch: foreign” if arch-unqualified.
+  * Take architecture into account in virtual packages on remove and
+    configure dpkg actions. Closes: #683411
 
   [ Updated programs translations ]
   * Czech (Miroslav Kure).

+ 5 - 0
src/packages.c

@@ -603,6 +603,11 @@ dependencies_ok(struct pkginfo *pkg, struct pkginfo *removing,
             continue;
           debug(dbg_depcondetail, "     checking provider %s",
                 pkg_name(provider->up->up, pnaw_always));
+          if (!deparchsatisfied(&provider->up->up->installed, provider->arch,
+                                possi)) {
+            debug(dbg_depcondetail, "       provider does not satisfy arch");
+            continue;
+          }
           thisf = deppossi_ok_found(provider->up->up, pkg, removing,
                                     possi->ed,
                                     &possfixbytrig, &matched, NULL,