Просмотр исходного кода

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
Родитель
Сommit
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: ”.
   * Do not check presence of update-rc.d in the PATH in dpkg, as it's not
     a program needed for dpkg correct operation.
+  * Fix dpkg -GEO options on multiple versions of the same packages.
+    Closes: #31141
 
   [ Raphaël Hertzog ]
   * 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;
   if (!ver) return -1;