Author: jeroen
Date: 2006-03-18 03:19:20 +0100 (Sat, 18 Mar 2006)
New Revision: 584

Modified:
   trunk/checks/shared-libs
   trunk/debian/changelog
   trunk/testset/libbaz/debian/lib.shlibs
   trunk/testset/tags.libbaz
Log:
* checks/shared-libs:
  + [JvW] Consider also the soname version for shlibs checking, preventing
    some bogus 'duplicate' warnings, and actually throw a warning when
    soname version doesn't match


Modified: trunk/checks/shared-libs
===================================================================
--- trunk/checks/shared-libs    2006-03-18 01:38:38 UTC (rev 583)
+++ trunk/checks/shared-libs    2006-03-18 02:19:20 UTC (rev 584)
@@ -274,10 +274,11 @@
            my $udeb="";
            $udeb = "udeb: " if s/^udeb:\s+//o;
            @words = split(/\s+/o,$_);
-           if ($shlibs_control{$udeb.$words[0]}) {
-               tag "duplicate-entry-in-shlibs-control-file", "$udeb$words[0]";
+           my $shlibs_string = $udeb.$words[0].' '.$words[1];
+           if ($shlibs_control{$shlibs_string}) {
+               tag "duplicate-entry-in-shlibs-control-file", $shlibs_string;
            } else {
-               $shlibs_control{$udeb.$words[0]} = 1;
+               $shlibs_control{$shlibs_string} = 1;
            }
        }
        close(SHLIBS);
@@ -285,11 +286,11 @@
        for my $shlib (@shlibs) {
            $shlib_name = $SONAME{$shlib};
            # libfoo.so.X.X
-           if ($shlib_name =~ m/(.+)\.so\..*$/) {
-               $shlib_name = $1;
+           if ($shlib_name =~ m/(.+)\.so\.(.*)$/) {
+               $shlib_name = "$1 $2";
            # libfoo-X.X.so
-           } elsif ($shlib_name =~ m/(.+)\-\w[\w\.]*\.so$/) {
-               $shlib_name = $1;
+           } elsif ($shlib_name =~ m/(.+)\-(\w[\w\.]*)\.so$/) {
+               $shlib_name = "$1 $2";
            }
            $shlibs_control_used{$shlib_name} = 1;
            $shlibs_control_used{"udeb: ".$shlib_name} = 1;
@@ -297,11 +298,11 @@
                # skip it if it's not a public shared library
                next unless defined $ldso_dir{dirname($shlib)};
                # no!!
-               tag "shlib-missing-in-control-file", "$shlib_name $shlib";
+               tag "shlib-missing-in-control-file", $shlib_name, 'for', $shlib;
            }
        }
        for $shlib_name (keys %shlibs_control) {
-           tag "unused-shlib-entry-in-control-file", "$shlib_name"
+           tag "unused-shlib-entry-in-control-file", $shlib_name
                unless $shlibs_control_used{$shlib_name};
        }
     }

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2006-03-18 01:38:38 UTC (rev 583)
+++ trunk/debian/changelog      2006-03-18 02:19:20 UTC (rev 584)
@@ -1,4 +1,4 @@
-lintian (1.23.16) UNRELEASED; urgency=low
+lintian (1.23.16~r583) UNRELEASED; urgency=low
 
   The "What's this Russ guy up to?" release
 
@@ -69,6 +69,9 @@
       no postinst at all, instead of just one lacking a ldconfig call
     + [JvW] Implement checks for "udeb:" lines in shlibs files
       (Closes: #357541)
+    + [JvW] Consider also the soname version for shlibs checking, preventing
+      some bogus 'duplicate' warnings, and actually throw a warning when
+      soname version doesn't match
 
   * debian/{control,copyright}:
     + [RA] Add Russ Allbery to Uploaders and copyright.

Modified: trunk/testset/libbaz/debian/lib.shlibs
===================================================================
--- trunk/testset/libbaz/debian/lib.shlibs      2006-03-18 01:38:38 UTC (rev 
583)
+++ trunk/testset/libbaz/debian/lib.shlibs      2006-03-18 02:19:20 UTC (rev 
584)
@@ -1,4 +1,5 @@
 libdoesntexist2 1.0 libbaz2
 libdoesntexist2 1.0 libbaz2
+libbaz2 1.1 libbaz2
 udeb: libdoesntexist2 1.0 libbaz2
 udeb: libdoesntexist2 1.0 libbaz2

Modified: trunk/testset/tags.libbaz
===================================================================
--- trunk/testset/tags.libbaz   2006-03-18 01:38:38 UTC (rev 583)
+++ trunk/testset/tags.libbaz   2006-03-18 02:19:20 UTC (rev 584)
@@ -1,12 +1,12 @@
 E: libbaz1: control-file-has-bad-permissions shlibs 0755 != 0644
-E: libbaz1: duplicate-entry-in-shlibs-control-file libdoesntexist2
-E: libbaz1: duplicate-entry-in-shlibs-control-file udeb: libdoesntexist2
+E: libbaz1: duplicate-entry-in-shlibs-control-file libdoesntexist2 1.0
+E: libbaz1: duplicate-entry-in-shlibs-control-file udeb: libdoesntexist2 1.0
 E: libbaz1: file-directly-in-usr-share-doc usr/share/doc/README.Debian
 E: libbaz1: ldconfig-symlink-missing-for-shlib usr/lib/libbaz2.so.1.0 
usr/lib/libfoo2.so.1.0.3b libbaz2.so.1.0
 E: libbaz1: maintainer-shell-script-fails-syntax-check postinst
 E: libbaz1: postinst-must-call-ldconfig usr/lib/libfoo2.so.1.0.3b
 E: libbaz1: sharedobject-in-library-directory-not-actually-a-shlib 
usr/lib/libbaz1.so.1.0.3b
-E: libbaz1: shlib-missing-in-control-file libbaz2 usr/lib/libfoo2.so.1.0.3b
+E: libbaz1: shlib-missing-in-control-file libbaz2 1.0 for 
usr/lib/libfoo2.so.1.0.3b
 E: libbaz1: shlib-with-executable-bit usr/lib/libfoo2.so.1.0.3b 0755
 E: libbaz1: shlib-with-non-pic-code usr/lib/libbaz1.so.1.0.3b
 E: libbaz1: unstripped-binary-or-object ./usr/lib/libbaz1.so.1.0.3b
@@ -21,7 +21,8 @@
 W: libbaz1: missing-depends-line
 W: libbaz1: package-name-doesnt-match-sonames libbaz2-1.0
 W: libbaz1: postinst-should-not-set-usr-doc-link
-W: libbaz1: unused-shlib-entry-in-control-file libdoesntexist2
-W: libbaz1: unused-shlib-entry-in-control-file udeb: libdoesntexist2
+W: libbaz1: unused-shlib-entry-in-control-file libbaz2 1.1
+W: libbaz1: unused-shlib-entry-in-control-file libdoesntexist2 1.0
+W: libbaz1: unused-shlib-entry-in-control-file udeb: libdoesntexist2 1.0
 W: libbaz1: zero-byte-file-in-doc-directory usr/share/doc/README.Debian
 W: libbaz2: package-name-doesnt-match-sonames libbaz2-1.0


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

Reply via email to