Explorar el Código

libdpkg: Always ignore older versions when parsing the available file

To be able to get a proper candidate for dselect the latest version
from the available file should always be selected, regardless of who
is loading the file.
Guillem Jover hace 14 años
padre
commit
4e77471900
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 2 0
      debian/changelog
  2. 1 1
      lib/dpkg/parse.c

+ 2 - 0
debian/changelog

@@ -69,6 +69,8 @@ dpkg (1.16.2) UNRELEASED; urgency=low
     and --show, add a new --load-avail option to expose the old behaviour.
   * Only allow setting selections via «dpkg --set-selections» for known
     packages (i.e. those present in either the status or available files).
+  * Always ignore older versions when parsing the available file, not only
+    for --update-avail and --merge-avail.
 
   [ Raphaël Hertzog ]
   * Update Dpkg::Shlibs to look into multiarch paths when cross-building

+ 1 - 1
lib/dpkg/parse.c

@@ -591,7 +591,7 @@ int parsedb(const char *filename, enum parsedbflags flags,
     else
       db_pkgbin = &db_pkg->installed;
 
-    if ((flags & pdb_ignoreolder) &&
+    if (((flags & pdb_ignoreolder) || ps.type == pdb_file_available) &&
         versioncompare(&new_pkgbin->version, &db_pkgbin->version) < 0)
       continue;