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

[SCM] Debian package checker branch, master, updated. 2.5.0-15-g14f6f5e



The following commit has been merged in the master branch:
commit 14f6f5e34ddd30468ea83d975ea91cfe827185dd
Author: Niels Thykier <niels@thykier.net>
Date:   Tue May 31 11:33:13 2011 +0200

    Added tag for non-empty dependency_libs field in la files

diff --git a/checks/shared-libs b/checks/shared-libs
index 4e42873..c985040 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -165,18 +165,21 @@ for my $cur_file (@{$info->sorted_index}) {
 	open(LAFILE, "< unpacked/$cur_file")
 	    or fail("Could not open unpacked/$cur_file for reading!");
 	while(<LAFILE>) {
-	    next unless (m/^libdir='(.+?)'$/);
-	    my $actual = $1;
-	    $actual =~ s,/+$,,;
-	    my ($expected) = ("/$cur_file" =~ m,^(.+)/[^/]+$,);
-
-	    # python-central is a special case since the libraries are moved
-	    # at install time.
-	    next if ($actual =~ m,^/usr/lib/python[\d.]+/(?:site|dist)-packages,
-		     and $expected =~ m,^/usr/share/pyshared,);
-	    tag "incorrect-libdir-in-la-file", $cur_file, "$actual != $expected"
-		unless($expected eq $actual);
-	    last;
+	    next unless (m/^(libdir)='(.+?)'$/) or (m/^(dependency_libs)='(.+?)'$/);
+	    my ($field, $value) = ($1, $2);
+	    if ($field eq 'libdir') {
+		$value =~ s,/+$,,;
+		my ($expected) = ("/$cur_file" =~ m,^(.+)/[^/]+$,);
+
+		# python-central is a special case since the libraries are moved
+		# at install time.
+		next if ($value =~ m,^/usr/lib/python[\d.]+/(?:site|dist)-packages,
+			 and $expected =~ m,^/usr/share/pyshared,);
+		tag 'incorrect-libdir-in-la-file', $cur_file, "$value != $expected"
+		    unless($expected eq $value);
+	    } elsif ($field eq 'dependency_libs'){
+		tag 'non-empty-dependency_libs-in-la-file', $cur_file;
+	    }
 	}
 	close(LAFILE);
     }
diff --git a/checks/shared-libs.desc b/checks/shared-libs.desc
index e603bcd..377cd0f 100644
--- a/checks/shared-libs.desc
+++ b/checks/shared-libs.desc
@@ -409,3 +409,19 @@ Info: The given .la file points to a libdir other than the path where it is
  time instead of using <tt>DESTDIR</tt>.  The incorrect path will cause
  packages linking to this library using libtool to build incorrectly (adding
  incorrect paths to RPATH, for example).
+
+Tag: non-empty-dependency_libs-in-la-file
+Severity: serious
+Certainty: certain
+Info: The dependency_libs field in the .la file has not been cleared.  It has
+ long been a release goal to get rid of unneeded .la files and clearing the
+ dependency_libs field from the rest of them.
+ .
+ A non-empty dependency_libs field will also stall the Multi-Arch
+ conversation.
+ .
+ The in itself .la file may be useful, if the library is loaded dynamically
+ via libltdl.
+Ref: http://wiki.debian.org/ReleaseGoals/LAFileRemoval,
+     http://lists.debian.org/debian-devel/2011/05/msg01003.html,
+     http://lists.debian.org/debian-devel/2011/05/msg01146.html
diff --git a/debian/changelog b/debian/changelog
index ee21d13..08f77f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,17 @@
 lintian (2.5.1) UNRELEASED; urgency=low
 
+  * Summary of tag changes:
+    + Added:
+      - non-empty-dependency_libs-in-la-file
+
   * checks/fields{,.desc}:
     + [NT] Allow "all" and "any" to appear together in the Architecture
       field of a .dsc file.  (Closes: #626775)
   * checks/java:
     + [NT] Sort the jar files by name, so they are checked in the same
       order.
+  * checks/shared-libs{,.desc}:
+    + [NT] Added non-empty-dependency_libs-in-la-file. (Closes: #628673)
 
   * collection/java:
     + [NT] Fixed a regex that would accept any file ending with "jar" to
diff --git a/t/tests/shared-libs-la-files/debian/Makefile b/t/tests/shared-libs-la-files/debian/Makefile
index 6c7b78c..b490041 100644
--- a/t/tests/shared-libs-la-files/debian/Makefile
+++ b/t/tests/shared-libs-la-files/debian/Makefile
@@ -1,4 +1,4 @@
-LA_FILES:=kio_locate.la  _python_module.la  trailing-slash.la
+LA_FILES:=kio_locate.la  _python_module.la  trailing-slash.la dependency_libs.la
 
 %.la: %.txt
 	cp "$<" "$@"
diff --git a/t/tests/shared-libs-la-files/debian/debian/install b/t/tests/shared-libs-la-files/debian/debian/install
index 7bdf454..fdf1d81 100644
--- a/t/tests/shared-libs-la-files/debian/debian/install
+++ b/t/tests/shared-libs-la-files/debian/debian/install
@@ -1,3 +1,4 @@
+dependency_libs.la usr/lib
 kio_locate.la usr/lib/kde3
 trailing-slash.la usr/lib/lintian
 _python_module.la usr/share/pyshared
diff --git a/t/tests/shared-libs-la-files/debian/dependency_libs.txt b/t/tests/shared-libs-la-files/debian/dependency_libs.txt
new file mode 100644
index 0000000..34b0863
--- /dev/null
+++ b/t/tests/shared-libs-la-files/debian/dependency_libs.txt
@@ -0,0 +1,15 @@
+# Generated by ltmain.sh - GNU libtool 1.5.18 - (pwn3d by bksys)
+#
+#
+dlname='dependency_libs.so'
+library_names='dependency_libs.so'
+old_library=''
+dependency_libs='/usr/lib/libdep.la'
+current=0
+age=0
+revision=0
+installed=yes
+shouldnotlink=no
+dlopen=''
+dlpreopen=''
+libdir='/usr/lib'
diff --git a/t/tests/shared-libs-la-files/desc b/t/tests/shared-libs-la-files/desc
index 4e5ce00..abd45a2 100644
--- a/t/tests/shared-libs-la-files/desc
+++ b/t/tests/shared-libs-la-files/desc
@@ -2,4 +2,6 @@ Testname: shared-libs-la-files
 Sequence: 6000
 Version: 1.0
 Description: Test checks related to libtool .la files
-Test-For: incorrect-libdir-in-la-file
+Test-For:
+ incorrect-libdir-in-la-file
+ non-empty-dependency_libs-in-la-file
diff --git a/t/tests/shared-libs-la-files/tags b/t/tests/shared-libs-la-files/tags
index 5e31e3c..65c14f8 100644
--- a/t/tests/shared-libs-la-files/tags
+++ b/t/tests/shared-libs-la-files/tags
@@ -1 +1,2 @@
 E: shared-libs-la-files: incorrect-libdir-in-la-file usr/lib/kde3/kio_locate.la /build/buildd/kio-locate-0.4.5+ds/debian/kio-locate/usr/lib/kde3 != /usr/lib/kde3
+E: shared-libs-la-files: non-empty-dependency_libs-in-la-file usr/lib/dependency_libs.la

-- 
Debian package checker


Reply to: