[Reproducible-commits] [dpkg] 23/40: dpkg-scanpackages: Sort output by package name and version

Jérémy Bobbio lunar at moszumanska.debian.org
Sat May 30 09:52:49 UTC 2015


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

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit dbdb71563e75a96cee24955db4d9981be8f7f8e9
Author: Maximilian Schwerin <maximilian.schwerin at tigris.de>
Date:   Wed May 20 09:56:41 2015 +0200

    dpkg-scanpackages: Sort output by package name and version
    
    This is useful if multiple versions of the same package are kept
    together in the same repository.
    
    Signed-off-by: Guillem Jover <guillem at debian.org>
---
 debian/changelog             | 2 ++
 scripts/dpkg-scanpackages.pl | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 6bd2162..f73be60 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,8 @@ dpkg (1.18.1) UNRELEASED; urgency=low
   * Honor Pre-Depends, Conflicts and Breaks for packages in unpacked and
     half states. Thanks to Ian Jackson <iwj at ubuntu.com>. Closes: #377860
   * Fix build failure on FreeBSD by actually using libmd if available.
+  * Sort dpkg-scanpackages output by package name and version.
+    Thanks to Maximilian Schwerin <maximilian.schwerin at tigris.de>.
   * Perl modules:
     - Add missing strict and warnings pragmas for submodules.
     - Use non-destructive substitutions inside map.
diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl
index 8cb8020..faf8ea2 100755
--- a/scripts/dpkg-scanpackages.pl
+++ b/scripts/dpkg-scanpackages.pl
@@ -268,7 +268,7 @@ for my $p (sort keys %packages) {
     if (defined($override) and not defined($overridden{$p})) {
         push @missingover, $p;
     }
-    for my $package (@{$packages{$p}}) {
+    for my $package (sort { $a->{Version} cmp $b->{Version} } @{$packages{$p}}) {
          print("$package\n") or syserr(g_('failed when writing stdout'));
          $records_written++;
     }

-- 
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