[csw-devel] SF.net SVN: gar:[20118] csw/mgar/gar/v2/lib/python/dependency_checks.py

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sun Jan 13 20:49:40 CET 2013


Revision: 20118
          http://gar.svn.sourceforge.net/gar/?rev=20118&view=rev
Author:   chninkel
Date:     2013-01-13 19:49:39 +0000 (Sun, 13 Jan 2013)
Log Message:
-----------
gar/v2: doesn't check direct binding on soname which were not really used

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/dependency_checks.py

Modified: csw/mgar/gar/v2/lib/python/dependency_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/dependency_checks.py	2013-01-13 18:11:31 UTC (rev 20117)
+++ csw/mgar/gar/v2/lib/python/dependency_checks.py	2013-01-13 19:49:39 UTC (rev 20118)
@@ -171,10 +171,12 @@
           pkgname, messenger)
       orphan_sonames.extend(orphan_sonames_tmp)
 
+    sonames_unused = set()
     ldd_info = pkg_data['ldd_info'][binary_info["path"]]
     for ldd_response in ldd_info:
       if (ldd_response['state'] == 'soname-unused'
           and ldd_response['soname'] not in BASE_SOLARIS_LIBRARIES):
+        sonames_unused.add(ldd_response['soname'])
         messenger.Message(
           "Binary %s links to library %s but doesn't seem to use any"
           " of its symbols. It usually happens because superfluous"
@@ -211,6 +213,11 @@
           db_libs.add(syminfo['soname'])
     no_db_libs = libs.difference(db_libs)
 
+    # no symbol used means no way to detect if direct binding was
+    # enabled so we must ignore the libraries which were linked
+    # without being used
+    no_db_libs.difference_update(sonames_unused)
+
     if no_db_libs:
       messenger.Message(
         "No symbol of binary %s is directly bound against the following"

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list