瀏覽代碼

dpkg: Honor Conflicts/Breaks/Pre-Depends for packages in unpacked and half states

Closes: #377860
Signed-off-by: Guillem Jover <guillem@debian.org>
Ian Jackson 11 年之前
父節點
當前提交
bf316c32ed
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 2 0
      debian/changelog
  2. 5 0
      src/depcon.c

+ 2 - 0
debian/changelog

@@ -10,6 +10,8 @@ dpkg (1.18.1) UNRELEASED; urgency=low
   * Set the SE Linux file context even when the file mode has no file type.
   * Set the SE Linux file context even when the file mode has no file type.
   * Make dpkg-buildpackage -j override any parallel option specified in
   * Make dpkg-buildpackage -j override any parallel option specified in
     DEB_BUILD_OPTIONS. Regression introduced in dpkg 1.14.15.
     DEB_BUILD_OPTIONS. Regression introduced in dpkg 1.14.15.
+  * Honor Pre-Depends, Conflicts and Breaks for packages in unpacked and
+    half states. Thanks to Ian Jackson <iwj@ubuntu.com>. Closes: #377860
   * Perl modules:
   * Perl modules:
     - Add missing strict and warnings pragmas for submodules.
     - Add missing strict and warnings pragmas for submodules.
     - Use non-destructive substitutions inside map.
     - Use non-destructive substitutions inside map.

+ 5 - 0
src/depcon.c

@@ -340,6 +340,11 @@ depisok(struct dependency *dep, struct varbuf *whynot,
     case PKG_STAT_HALFCONFIGURED:
     case PKG_STAT_HALFCONFIGURED:
     case PKG_STAT_UNPACKED:
     case PKG_STAT_UNPACKED:
     case PKG_STAT_HALFINSTALLED:
     case PKG_STAT_HALFINSTALLED:
+      if (dep->type == dep_predepends ||
+          dep->type == dep_conflicts ||
+          dep->type == dep_breaks)
+        break;
+      /* Fall through. */
     case PKG_STAT_CONFIGFILES:
     case PKG_STAT_CONFIGFILES:
     case PKG_STAT_NOTINSTALLED:
     case PKG_STAT_NOTINSTALLED:
       return true;
       return true;