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

[SCM] Debian package checker branch, master, updated. 2.2.6-6-gda80c77



The following commit has been merged in the master branch:
commit 60b5aed2f3231e6cf0885b26cacca6701a654250
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Wed Feb 25 21:59:57 2009 +0000

    Fix a logic error checking the position of meta-information in symbols files.
    
    When parsing symbols files, correctly ensure that meta-information occurs
    between the end of the dependency template(s) and the start of the symbol
    list.  The code that was intended to check this resulted in a false positive
    syntax error being generated if a file with alternative dependency templates
    used meta-information.

diff --git a/checks/shared-libs b/checks/shared-libs
index 2beeaff..288c4f2 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -359,6 +359,7 @@ if ($#shlibs == -1 and not %unversioned_shlibs) {
     my @symbols_depends;
     my $dep_templates = 0;
     my $meta_info_seen = 0;
+    my $symbol_count = 0;
 
     while (<IN>) {
 	chomp;
@@ -380,6 +381,7 @@ if ($#shlibs == -1 and not %unversioned_shlibs) {
 
 	    $dep_templates = 0;
 	    $meta_info_seen = 0;
+	    $symbol_count = 0;
 	} elsif (m/^\|\s+(\S+)(?:\s(\S+\s\S+))?(\s*,\s+\S+(\s\S+\s\S+)?)*$/) {
 	    # alternative dependency template
 
@@ -405,7 +407,7 @@ if ($#shlibs == -1 and not %unversioned_shlibs) {
 	    tag "unknown-meta-field-in-symbols-file", "$1, line $."
 		unless $1 eq 'Build-Depends-Package';
 	    tag "syntax-error-in-symbols-file", $.
-		if $dep_templates > 0;
+		unless defined $soname and $symbol_count == 0;
 
 	    $meta_info_seen = 1;
 	} elsif (m/^\s+(\S+)\s(\S+)(?:\s(\S+(\s\S+)?))?$/) {
@@ -414,6 +416,7 @@ if ($#shlibs == -1 and not %unversioned_shlibs) {
 	    tag "syntax-error-in-symbols-file", $.
 		unless defined $soname;
 
+	    $symbol_count++;
 	    my ($sym, $v, $dep_order) = ($1, $2, $3);
 	    $dep_order ||= '';
 
diff --git a/debian/changelog b/debian/changelog
index 2f7fa3d..5f1d949 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,12 @@ lintian (2.2.7) UNRELEASED; urgency=low
   * checks/manpages:
     + [CW] Run man with '-E UTF-8' to avoid producing bogus warnings on
       localised manual pages due to attempting to recode through ASCII.
+  * checks/shared-libs:
+    + [ADB] When parsing symbols files, correctly ensure that meta-information
+      occurs between the end of the dependency template(s) and the start of
+      the symbol list.  The cocde that was intended to check this resulted
+      in a false positive syntax error being generated if a file with
+      alternative dependency templates used meta-information.
 
   * debian/control:
     + [CW] Depend on man-db (>= 2.4.0) for '-E UTF-8'.

-- 
Debian package checker


Reply to: