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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat May 8 09:36:46 CEST 2010


Revision: 9838
          http://gar.svn.sourceforge.net/gar/?rev=9838&view=rev
Author:   wahwah
Date:     2010-05-08 07:36:45 +0000 (Sat, 08 May 2010)

Log Message:
-----------
mGAR v2: checkpkg, automatically appending /opt/csw/lib to RPATHs of Python libraries

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	2010-05-08 06:54:53 UTC (rev 9837)
+++ csw/mgar/gar/v2/lib/python/dependency_checks.py	2010-05-08 07:36:45 UTC (rev 9838)
@@ -34,7 +34,14 @@
       path_list = path_and_pkg_by_soname[soname].keys()
       logger.debug("%s @ %s: looking for %s in %s",
                    soname, binary_info["path"], binary_info["runpath"], path_list)
-      for runpath in binary_info["runpath"] + checkpkg.SYS_DEFAULT_RUNPATH:
+      runpath_list = binary_info["runpath"] + checkpkg.SYS_DEFAULT_RUNPATH
+      if IsDlopenLib(binary_info["path"]):
+        # This is a heuristic.  Libraries in certain paths lack the RPATH setting,
+        # but it's not a problem since they are dlopened.
+        for runpath in ("/opt/csw/lib", "/opt/csw/lib/64"):
+          if runpath not in runpath_list:
+            runpath_list.append(runpath)
+      for runpath in runpath_list:
         resolved_path = checkpkg.ResolveSoname(runpath, soname, isalist, path_list)
         if resolved_path:
           logger.debug("%s needed by %s:",
@@ -58,9 +65,6 @@
         orphan_sonames.append((soname, binary_info["path"]))
   orphan_sonames = set(orphan_sonames)
   for soname, binary_path in orphan_sonames:
-    if IsDlopenLib(binary_path):
-      # dlopen binaries don't need RPATH and can't be analyzed this way.
-      continue
     error_mgr.ReportError(
         pkgname, "soname-not-found",
         "%s is needed by %s" % (soname, binary_path))


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