瀏覽代碼

dpkg: Fix -GEO options on multiple versions of the same package

The options were not taking effect as they were only being applied to
installed packages, while the first stage usually implies unpacking
and then configuring in a later stage. Which implies having those
packages going from installed to unpacked, and then skipping any of
the checks requested by the user on subsequently processed packages.

Closes: #31141
Guillem Jover 16 年之前
父節點
當前提交
2561f28501
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 2 0
      debian/changelog
  2. 3 3
      src/archives.c

+ 2 - 0
debian/changelog

@@ -18,6 +18,8 @@ dpkg (1.16.0) UNRELEASED; urgency=low
   * Prefix all fatal error messages with “error: ”.
   * Prefix all fatal error messages with “error: ”.
   * Do not check presence of update-rc.d in the PATH in dpkg, as it's not
   * Do not check presence of update-rc.d in the PATH in dpkg, as it's not
     a program needed for dpkg correct operation.
     a program needed for dpkg correct operation.
+  * Fix dpkg -GEO options on multiple versions of the same packages.
+    Closes: #31141
 
 
   [ Raphaël Hertzog ]
   [ Raphaël Hertzog ]
   * Fail properly when debian/source/format is empty. Closes: #600854
   * Fail properly when debian/source/format is empty. Closes: #600854

+ 3 - 3
src/archives.c

@@ -1361,9 +1361,9 @@ wanttoinstall(struct pkginfo *pkg, const struct versionrevision *ver,
     }
     }
   }
   }
 
 
-  if (!(pkg->status == stat_installed ||
-        pkg->status == stat_triggersawaited ||
-        pkg->status == stat_triggerspending))
+  if (pkg->eflag & eflag_reinstreq)
+    return 1;
+  if (pkg->status < stat_unpacked)
     return 1;
     return 1;
   if (!ver) return -1;
   if (!ver) return -1;