[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 1.24.2-76-g036e005



The following commit has been merged in the master branch:
commit 036e005c0e23b460dc52f64b1e35f745d85e2d24
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Tue Aug 5 01:26:26 2008 +0100

    Sort file lists before walking them for consistency with direct parsing
    
    For cases where we output only the first occurence of a tag, sorting
    index, file_info, etc. ensures that the "first" file found is the same
    as if the files were being read directly

diff --git a/checks/binaries b/checks/binaries
index f13959c..a95bf6d 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -43,7 +43,7 @@ my %SONAME;
 
 $arch = $info->field('architecture');
 
-foreach my $file (keys %{$info->objdump_info}) {
+foreach my $file (sort keys %{$info->objdump_info}) {
     my $objdump = $info->objdump_info->{$file};
     $file = './' . $file;
 
@@ -120,7 +120,7 @@ tag "package-name-doesnt-match-sonames", "@sonames"
     if @sonames && !$match_found;
 
 my %directories;
-foreach (keys %{$info->file_info}) {
+foreach (sort keys %{$info->file_info}) {
     next unless length $_;
     my $data = $info->file_info->{$_};
     next unless $data =~ /^directory$/ or $data =~ / link to /;
@@ -128,7 +128,7 @@ foreach (keys %{$info->file_info}) {
 }
 
 # process all files in package
-foreach my $file (keys %{$info->file_info}) {
+foreach my $file (sort keys %{$info->file_info}) {
     my $fileinfo = $info->file_info->{$file};
     my $objdump = $info->objdump_info->{$file};
 
diff --git a/checks/changelog-file b/checks/changelog-file
index e2879dc..f9cb2bd 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -45,7 +45,7 @@ my %file_info;
 my %is_a_symlink;
 
 # Modify the file_info by following symbolic links.
-for my $file (keys %{$info->file_info}) {
+for my $file (sort keys %{$info->file_info}) {
     next unless $file =~ m/doc/o;
 
     $file_info{$file} = $info->file_info->{$file};
@@ -81,7 +81,7 @@ for my $file (keys %{$info->file_info}) {
 # together at random it seems here
 
 # Read package contents...
-foreach (keys %{$info->index}) { 
+foreach (sort keys %{$info->index}) { 
     next unless length $_;
     # skip packages which have a /usr/share/doc/$pkg -> foo symlink
     if (m,usr/share/doc/$ppkg$, and defined $info->index->{$_}->{link}) {
diff --git a/checks/copyright-file b/checks/copyright-file
index 15fab7f..86fb1fd 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -45,7 +45,7 @@ use lib "$ENV{'LINTIAN_ROOT'}/checks/";
 use common_data;
 
 # Read package contents...
-foreach (keys %{$info->{index}}) {
+foreach (sort keys %{$info->{index}}) {
     my $index_info = $info->{index}->{$_};
     if (m,usr/(share/)?doc/$ppkg/copyright(\.\S+)?$,) {
 	my $ext = $2;
diff --git a/checks/etcfiles b/checks/etcfiles
index 1cdbb33..abff91b 100644
--- a/checks/etcfiles
+++ b/checks/etcfiles
@@ -45,7 +45,7 @@ if (open(IN, '<', $conffiles)) {
 }
 
 # Read package contents...
-foreach my $file (keys %{$info->index}) {
+foreach my $file (sort keys %{$info->index}) {
     my $index_info = $info->index->{$file};
     next unless $file =~ m,^etc, and $index_info->{type}=~ m/^[-h]/;
 
diff --git a/checks/files b/checks/files
index 7fdecb8..fce8221 100644
--- a/checks/files
+++ b/checks/files
@@ -45,7 +45,7 @@ my %linked_against_libvga;
 my %script = ();
 
 # read data from objdump-info file
-foreach my $file (keys %{$info->objdump_info}) {
+foreach my $file (sort keys %{$info->objdump_info}) {
     my $objdump = $info->objdump_info->{$file};
     $file = './' . $file;
 
@@ -888,7 +888,7 @@ if ($pkg_section =~ m,games$,
 # so just ignore them.
 #
 # python-support needs a directory for each package even it might be empty
-foreach my $dir (keys %{$info->index}) {
+foreach my $dir (sort keys %{$info->index}) {
     next if $dir eq "" or $info->index->{$dir}->{type} ne 'd';
     next if ($dir =~ m{^var/} or $dir =~ m{^etc/});
     next if $pkg eq 'base-files';
diff --git a/checks/infofiles b/checks/infofiles
index 9ce503b..1f956c3 100644
--- a/checks/infofiles
+++ b/checks/infofiles
@@ -45,7 +45,7 @@ check_script("prerm", \%prerm) if (-f "control/prerm");
 check_script("postrm", \%postrm) if (-f "control/postrm");
 
 # Read package contents...
-foreach my $file (keys %{$info->index}) {
+foreach my $file (sort keys %{$info->index}) {
     my $index_info = $info->index->{$file};
     my $file_info = $info->file_info->{$file};
     my $link = $index_info->{link} || '';
diff --git a/checks/manpages b/checks/manpages
index 1bff966..e81108d 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -43,7 +43,7 @@ my %link;
 my %manpage;
 
 # Read package contents...
-foreach my $file (keys %{$info->index}) {
+foreach my $file (sort keys %{$info->index}) {
     my $index_info = $info->index->{$file};
     my $file_info = $info->file_info->{$file};
     my $link = $index_info->{link} || '';
diff --git a/checks/menu-format b/checks/menu-format
index c01cc22..8518811 100644
--- a/checks/menu-format
+++ b/checks/menu-format
@@ -398,7 +398,7 @@ closedir MENUDIR;
 # of every file in the package to use to verify that the command referenced by
 # a menu item or desktop entry is there.
 my @desktop_files;
-foreach my $file (keys %{$info->index}) {
+foreach my $file (sort keys %{$info->index}) {
     my $index_info = $info->index->{$file};
     my $operm = $index_info->{operm};
 
diff --git a/checks/scripts b/checks/scripts
index 8dd74a5..af3eb8a 100644
--- a/checks/scripts
+++ b/checks/scripts
@@ -195,7 +195,7 @@ my $pkg = shift;
 my $type = shift;
 my $info = shift;
 
-foreach (keys %{$info->index}) {
+foreach (sort keys %{$info->index}) {
     next if $_ eq "";
     my $index_info = $info->index->{$_};
     my $operm = $index_info->{operm};
@@ -206,7 +206,7 @@ foreach (keys %{$info->index}) {
     $suid{'./' . $_} = $is_suid;
 }
 
-for my $file (keys %{$info->file_info}) {
+for my $file (sort keys %{$info->file_info}) {
     $ELF{'./' . $file} = 1 if $info->file_info->{$file} =~ /^[^,]*\bELF\b/o;
 }
 
diff --git a/checks/shared-libs b/checks/shared-libs
index 9e2fb38..a004113 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -70,12 +70,12 @@ my $type = shift;
 my $info = shift;
 
 # 1st step: get info about shared libraries installed by this package
-foreach my $file (keys %{$info->objdump_info}) {
+foreach my $file (sort keys %{$info->objdump_info}) {
     my $objdump = $info->objdump_info->{$file};
     $SONAME{$file} = $objdump->{SONAME}[0] if defined $objdump->{SONAME};
 }
 
-foreach my $file (keys %{$info->file_info}) {
+foreach my $file (sort keys %{$info->file_info}) {
     next unless length $file;
     my $fileinfo = $info->file_info->{$file};
     if ($fileinfo =~ m/^[^,]*\bELF\b/ && $fileinfo =~ m/shared object/) {
@@ -85,7 +85,7 @@ foreach my $file (keys %{$info->file_info}) {
 
 # 2nd step: read package contents
 
-for my $cur_file (keys %{$info->index}) {
+for my $cur_file (sort keys %{$info->index}) {
     # shared library?
     my $cur_file_data = $info->index->{$cur_file};
 
diff --git a/testset/tags.debug b/testset/tags.debug
index 53d013e..1ad1d02 100644
--- a/testset/tags.debug
+++ b/testset/tags.debug
@@ -4,7 +4,7 @@ E: hello: pkg-has-symbols-control-file-but-no-shared-libs
 E: hello: statically-linked-binary ./usr/bin/hello.dbg
 E: hello: unstripped-binary-or-object ./usr/bin/hello.dbg
 E: libhello0-dbg: binary-with-bad-dynamic-table ./usr/lib/libhello.so.dbg
-E: libhello0-dbg: missing-dependency-on-libc needed by ./usr/lib/debug/libhello.so.0.0 and 1 others
+E: libhello0-dbg: missing-dependency-on-libc needed by ./usr/lib/debug/lib/libhello.so.0.0 and 1 others
 E: libhello0-dbg: sharedobject-in-library-directory-missing-soname usr/lib/libhello.so.dbg
 E: libhello0: duplicate-entry-in-symbols-control-file libhello 0
 E: libhello0: invalid-template-id-in-symbols-file 11

-- 
Debian package checker


Reply to: