Package: linda
Version: 0.3.19
Severity: normal
Tags: patch

Hello,

This bug report is a little bit different from #357727 (linda: Linked
library dependency check false positive? (Or details appreciated.)).


Linda outputs the following warning with the passwd package:
W: passwd; A binary links against a library it does not use symbols from

(And I think the passwd package uses the right dependency, i.e. the ones
computed by dpkg-dev (${shlibs:Depends}).


passwd uses symbols from the /lib/libpam_misc.so.0, provided by the libpam0g 
package.
But in the binary.py check, linda checks wether passwd depends on a
packages whose name starts with "libpam_misc", which is not the case.


The attached patch fixes this (but it is a little bit slower, and may not
be linda way (I don't use the lab)).

Kind Regards,
-- 
Nekral
diff -rauN ../orig/linda-0.3.19/checks/binary.py ./linda-0.3.19/checks/binary.py
--- ../orig/linda-0.3.19/checks/binary.py       2006-03-21 01:06:41.000000000 
+0100
+++ ./linda-0.3.19/checks/binary.py     2006-03-23 22:40:18.000000000 +0100
@@ -1,6 +1,6 @@
 import re
 from linda import libchecks, checks
-from linda.funcs import explode_path
+from linda.funcs import explode_path, run_external_cmd
 from sets import Set
 
 class BinaryCheck(libchecks.LindaChecker):
@@ -142,8 +142,10 @@
             for lib in libs.keys():
                 found = 0
                 for dep in dependancies:
-                    if dep.startswith(libs[lib]):
-                        found = 1
+                    dep_file_list = run_external_cmd('dpkg -L %s' % dep, 1)
+                    for file in dep_file_list.split('\n'):
+                        if file.endswith("/%s" % lib):
+                            found = 1
                 if not found:
                     libs_not_in_depends += 1
             if libs_not_in_depends:

Reply via email to