[Reproducible-commits] [dpkg] 09/11: libdpkg: Only ignore older packages if the existing version is informative

Holger Levsen holger at layer-acht.org
Tue May 3 08:43:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag 1.16.11
in repository dpkg.

commit 6e61b0d6859aef93cb6689f0550295e77edebc23
Author: Guillem Jover <guillem at debian.org>
Date:   Mon Jun 10 01:09:49 2013 +0200

    libdpkg: Only ignore older packages if the existing version is informative
    
    Cherry picked from commit 71d6e1b6c16df782dbe2736a285e7bd9040becd4.
    
    When ignoring older packages (either by explicit request, or when
    parsing available files), we should not ignore them when the existing
    version is empty, because then we would consider that the empty version
    (equivalent to "0-0") is newer than "0~0-0" for example.
    
    This affects any program using libdpkg to parse the available file.
    
    Regression introduced in commit 86823d5792af8328107c3d86e486d2cf373da128.
    
    Closes: #676664
---
 debian/changelog | 3 +++
 lib/dpkg/parse.c | 1 +
 2 files changed, 4 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 98f06c9..f6bae98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ dpkg (1.16.11) UNRELEASED; urgency=low
   [ Guillem Jover ]
   * Fix chmod() arguments order in Dpkg::Source::Quilt. Closes: #710265
     Thanks to Pablo Oliveira <pablo at sifflez.org>.
+  * Only ignore older packages if the existing version is informative. This
+    allows any program using libdpkg to parse the available file to see again
+    packages with versions lesser than 0-0 (like 0~0-0). Closes: #676664
 
   [ Updated programs translations ]
   * Vietnamese (Trần Ngọc Quân). Closes: #715334
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index 71076de..b51ca1b 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -742,6 +742,7 @@ int parsedb(const char *filename, enum parsedbflags flags,
       db_pkgbin = &db_pkg->installed;
 
     if (((flags & pdb_ignoreolder) || ps.type == pdb_file_available) &&
+        dpkg_version_is_informative(&db_pkgbin->version) &&
         dpkg_version_compare(&new_pkgbin->version, &db_pkgbin->version) < 0)
       continue;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list