Author: rra
Date: 2007-06-18 00:42:29 +0200 (Mon, 18 Jun 2007)
New Revision: 909

Modified:
   trunk/checks/files
   trunk/debian/changelog
   trunk/testset/tags.binary
   trunk/testset/tags.etcfiles
   trunk/unpack/unpack-binpkg-l1
Log:
  + [RA] Sort the files listed in package-contains-hardlink so that the
    lintian output is stable regardless of the hash order of the
    directory when the tar file was built.
  + [RA] Don't incorrectly skip all other file location checks for hard
    links.
* unpack/unpack-binpkg-l1:
  + [RA] Sort the output of tar tfv by filename so that the lintian
    output will be stable regardless of the hash order of the directory
    when the tar file was built.

Modified: trunk/checks/files
===================================================================
--- trunk/checks/files  2007-06-17 22:38:20 UTC (rev 908)
+++ trunk/checks/files  2007-06-17 22:42:29 UTC (rev 909)
@@ -76,6 +76,7 @@
 
 # Read package contents...
 open(IN,"index") or fail("cannot open index file index: $!");
+open(TEMP,">/tmp/output");
 while (<IN>) {
     chop;
 
@@ -90,12 +91,18 @@
        $link_target =~ s,^\./,,;
        my $link_target_dir = $link_target;
        $link_target_dir =~ s,[^/]*$,,;
+
+       # It may look weird to sort the file and link target here, but since
+       # it's a hard link, both files are equal and either could be
+       # legitimately reported first.  tar will generate different tar files
+       # depending on the hashing of the directory, and this sort produces
+       # stable lintian output despite that.
+       #
        # TODO: actually, policy says 'conffile', not '/etc' -> extend!
-       tag "package-contains-hardlink", $file, "->", $link_target
+       tag "package-contains-hardlink", join (' -> ', sort ($file, 
$link_target))
            if $file =~ m,^etc/,
                or $link_target =~ m,^etc/,
                or $file !~ m,^\Q$link_target_dir\E[^/]*$,;
-       next;
     } elsif ($perm =~ m/^l/) {
        ($file, $link) = split(' -> ', $file);
     }

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2007-06-17 22:38:20 UTC (rev 908)
+++ trunk/debian/changelog      2007-06-17 22:42:29 UTC (rev 909)
@@ -6,6 +6,11 @@
   * checks/files:
     + [RA] Limit the Zope license exception to only .dtml, .pt, and .cpt
       files.  Thanks, Bernd Zeimetz.
+    + [RA] Sort the files listed in package-contains-hardlink so that the
+      lintian output is stable regardless of the hash order of the
+      directory when the tar file was built.
+    + [RA] Don't incorrectly skip all other file location checks for hard
+      links.
   * checks/menus:
     + [RA] Avoid a quadratic search of the files in the package on
       doc-base files that list tons of files individually.  This speeds up
@@ -19,8 +24,13 @@
   * checks/shared_libs:
     + [RA] Report the correct file for shlib-with-nonpic-code.
 
- -- Russ Allbery <[EMAIL PROTECTED]>  Sun, 17 Jun 2007 15:37:38 -0700
+  * unpack/unpack-binpkg-l1:
+    + [RA] Sort the output of tar tfv by filename so that the lintian
+      output will be stable regardless of the hash order of the directory
+      when the tar file was built.
 
+ -- Russ Allbery <[EMAIL PROTECTED]>  Sun, 17 Jun 2007 15:42:15 -0700
+
 lintian (1.23.31) unstable; urgency=low
 
   The "back under 100 open bugs" release.

Modified: trunk/testset/tags.binary
===================================================================
--- trunk/testset/tags.binary   2007-06-17 22:38:20 UTC (rev 908)
+++ trunk/testset/tags.binary   2007-06-17 22:42:29 UTC (rev 909)
@@ -19,8 +19,8 @@
 E: binary: non-wm-in-windowmanager-menu-section x11 /usr/lib/menu/binary:4
 E: binary: non-wm-in-windowmanager-menu-section x11 /usr/share/menu/binary:4
 E: binary: postinst-does-not-call-installdocs usr/share/doc-base/binary
-E: binary: postinst-does-not-call-updatemenus usr/lib/menu/binary
-E: binary: postrm-does-not-call-updatemenus usr/lib/menu/binary
+E: binary: postinst-does-not-call-updatemenus usr/share/menu/binary
+E: binary: postrm-does-not-call-updatemenus usr/share/menu/binary
 E: binary: prerm-does-not-call-installdocs usr/share/doc-base/binary
 E: binary: statically-linked-binary ./usr/bin/static-hello
 E: binary: su-wrapper-without--c /usr/lib/menu/binary:2 su-to-root
@@ -51,6 +51,8 @@
 W: binary: doc-base-file-unknown-format binary:16 esp
 W: binary: executable-not-elf-or-script ./usr/bin/iminusrbin
 W: binary: file-in-unusual-dir usr/bar
+W: binary: file-in-unusual-dir usr/bar2
+W: binary: file-in-unusual-dir usr/foo
 W: binary: menu-command-not-in-package /usr/lib/menu/binary:11 imnothere
 W: binary: menu-command-not-in-package /usr/lib/menu/binary:7 /imnothere
 W: binary: menu-command-not-in-package /usr/share/menu/binary:11 imnothere

Modified: trunk/testset/tags.etcfiles
===================================================================
--- trunk/testset/tags.etcfiles 2007-06-17 22:38:20 UTC (rev 908)
+++ trunk/testset/tags.etcfiles 2007-06-17 22:42:29 UTC (rev 909)
@@ -11,4 +11,4 @@
 W: etcfiles: file-missing-in-md5sums etc/improper-link
 W: etcfiles: file-missing-in-md5sums usr/share/doc/etcfiles/changelog
 W: etcfiles: non-etc-file-marked-as-conffile /var/lib/foo
-W: etcfiles: package-contains-hardlink etc/improper-link -> etc/improper
+W: etcfiles: package-contains-hardlink etc/improper -> etc/improper-link

Modified: trunk/unpack/unpack-binpkg-l1
===================================================================
--- trunk/unpack/unpack-binpkg-l1       2007-06-17 22:38:20 UTC (rev 908)
+++ trunk/unpack/unpack-binpkg-l1       2007-06-17 22:42:29 UTC (rev 909)
@@ -60,6 +60,7 @@
 
 # create index of control.tar.gz
 pipeline((sub { exec "tar", "tvf", "$base_dir/control.tar" }),
+        (sub { exec "sort", "-k", "6" }),
         "$base_dir/control-index") == 0
     or fail();
 
@@ -75,6 +76,7 @@
 pipeline((sub { exec "dpkg-deb", "--fsys-tarfile", $file }),
         (sub { exec "tar", "tfv", "-" }),
         (sub { exec "sed", "-e", "s/^h/-/" }),
+        (sub { exec "sort", "-k", "6" }),
         "$base_dir/index") == 0
     or fail();
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to