瀏覽代碼

dpkg: On removal check Depends and Pre-Depends for unpacked packages

Ignoring those dependencies for packages in unpacked and half-configured
states does not improve their progress towards an installed state, it
actually degrades it.
Guillem Jover 12 年之前
父節點
當前提交
67ef2fc226
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 0
      debian/changelog
  2. 1 3
      src/remove.c

+ 2 - 0
debian/changelog

@@ -32,6 +32,8 @@ dpkg (1.17.11) UNRELEASED; urgency=low
     - Versioned virtual packages will satisfy non-versioned dependencies.
     - Versioned virtual packages will satisfy non-versioned dependencies.
     Based on skeletal code by Ben Collins <bcollins@debian.org>.
     Based on skeletal code by Ben Collins <bcollins@debian.org>.
     Closes: #7330, #24934, #112131, #134582, #180316
     Closes: #7330, #24934, #112131, #134582, #180316
+  * On removal check Depends and Pre-Depends for packages in unpacked and
+    half-configured states too.
 
 
   [ Updated programs translations ]
   [ Updated programs translations ]
   * Danish (Joe Dalton). Closes: #754127
   * Danish (Joe Dalton). Closes: #754127

+ 1 - 3
src/remove.c

@@ -63,9 +63,7 @@ static void checkforremoval(struct pkginfo *pkgtoremove,
     depender= possi->up->up;
     depender= possi->up->up;
     debug(dbg_depcon, "checking depending package '%s'",
     debug(dbg_depcon, "checking depending package '%s'",
           pkg_name(depender, pnaw_always));
           pkg_name(depender, pnaw_always));
-    if (!(depender->status == PKG_STAT_INSTALLED ||
-          depender->status == PKG_STAT_TRIGGERSPENDING ||
-          depender->status == PKG_STAT_TRIGGERSAWAITED))
+    if (depender->status < PKG_STAT_UNPACKED)
       continue;
       continue;
     if (ignore_depends(depender)) {
     if (ignore_depends(depender)) {
       debug(dbg_depcon, "ignoring depending package '%s'",
       debug(dbg_depcon, "ignoring depending package '%s'",