The following commit has been merged in the master branch:
commit fd971fda4b9daa283bc01f7a42947bddf541cb34
Author: Adam D. Barratt <[email protected]>
Date:   Sat Feb 21 17:49:43 2009 +0000

    Handle symbols files containing alternative dependencies with multiple 
entries
    
    Correctly handle alternative dependency lines in symbols files which contain
    multiple entries.  (Closes: #516427)
    
    It's valid for a symbols file to contain an alternative dependency of the
    form
    
    | foo (>> 1.2), foo (<<1.3)
    
    which should be treated as two separate dependencies, of each which should
    be checked.

diff --git a/checks/shared-libs b/checks/shared-libs
index 17f34f6..2beeaff 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -380,7 +380,7 @@ if ($#shlibs == -1 and not %unversioned_shlibs) {
 
            $dep_templates = 0;
            $meta_info_seen = 0;
-       } elsif (m/^\|\s+(\S+)(?:\s(\S+(\s\S+)))?$/) {
+       } elsif (m/^\|\s+(\S+)(?:\s(\S+\s\S+))?(\s*,\s+\S+(\s\S+\s\S+)?)*$/) {
            # alternative dependency template
 
            if ($meta_info_seen or not defined $soname) {
@@ -389,6 +389,13 @@ if ($#shlibs == -1 and not %unversioned_shlibs) {
 
            ($dep_package, $dep) = ($1, $2 || '');
            push @symbols_depends, $dep_package . ' ' . $dep;
+           if (defined $3) {
+               my $deps = $3;
+               while ($deps =~ m/\s*,\s+(\S+)(?:\s(\S+\s\S+))?/g) {
+                   ($dep_package, $dep) = ($1, $2 || '');
+                   push @symbols_depends, $dep_package . ' '. $dep;
+               }
+           }
            $dep_templates++;
        } elsif (m/^\*\s(\S+):\s(\S+)/) {
            # meta-information
diff --git a/debian/changelog b/debian/changelog
index f621f81..774a27d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,8 @@ lintian (2.2.6) UNRELEASED; urgency=low
   * checks/shared-libs:
     + [RA] Save a local reference to objdump information to reduce the
       number of method calls.  Patch from Raphael Geissert.
+    + [ADB] Correctly handle alternative dependency lines in symbols files
+      which contain multiple entries.  (Closes: #516427)
 
   * collection/strings{,.desc}:
     + [RA] Collect a list of ELF binaries in the package and the output of
diff --git a/testset/debug/debian/_symbols b/testset/debug/debian/_symbols
index a91ce05..e9ec69c 100644
--- a/testset/debug/debian/_symbols
+++ b/testset/debug/debian/_symbols
@@ -4,7 +4,7 @@
  and so should this
 
 libhello.so.0 libhello0 #MINVER#
-| libhello0c2 (>= 1.2)
+| libhello0c2 (>= 1.2), libhelloc0c2 (<< 1.3)
 | hello-dbg
  he...@base 1.0
 * Build-Dep-Foo: bar
diff --git a/testset/tags.debug b/testset/tags.debug
index 1ca31de..674bbe4 100644
--- a/testset/tags.debug
+++ b/testset/tags.debug
@@ -39,4 +39,5 @@ W: libhello0: symbols-declares-dependency-on-other-package 
hello-dbg
 W: libhello0: symbols-declares-dependency-on-other-package libhello0c2 (>= 1.2)
 W: libhello0: symbols-declares-dependency-on-other-package libhello2 #MINVER#
 W: libhello0: symbols-declares-dependency-on-other-package libhello2 (>= 1:2.3)
+W: libhello0: symbols-declares-dependency-on-other-package libhelloc0c2 (<< 
1.3)
 W: libhello0: unused-shlib-entry-in-symbols-control-file libhello 2

-- 
Debian package checker


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

Reply via email to