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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Oct 10 22:31:29 CEST 2010


Revision: 11210
          http://gar.svn.sourceforge.net/gar/?rev=11210&view=rev
Author:   wahwah
Date:     2010-10-10 20:31:29 +0000 (Sun, 10 Oct 2010)

Log Message:
-----------
mGAR v2: Refactoring, moving a function from one module to another.

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

Modified: csw/mgar/gar/v2/lib/python/package_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks.py	2010-10-10 20:31:00 UTC (rev 11209)
+++ csw/mgar/gar/v2/lib/python/package_checks.py	2010-10-10 20:31:29 UTC (rev 11210)
@@ -738,19 +738,8 @@
                   "or is not allowed for other reasons." % pkgname)
 
 
-def GetSharedLibs(pkg_data):
-  # Finding all shared libraries
-  shared_libs = []
-  for metadata in pkg_data["files_metadata"]:
-    if "mime_type" in metadata and metadata["mime_type"]:
-      # TODO: Find out where mime_type is missing and why
-      if "sharedlib" in metadata["mime_type"]:
-        shared_libs.append(metadata["path"])
-  return shared_libs
-
-
 def CheckLinkingAgainstSunX11(pkg_data, error_mgr, logger, messenger):
-  shared_libs = set(GetSharedLibs(pkg_data))
+  shared_libs = set(su.GetSharedLibs(pkg_data))
   for binary_info in pkg_data["binaries_dump_info"]:
     for soname in binary_info["needed sonames"]:
       if (binary_info["path"] in shared_libs
@@ -1006,7 +995,7 @@
 def CheckSharedLibraryNamingPolicy(pkg_data, error_mgr, logger, messenger):
   placement_re = re.compile("/opt/csw/lib")
   pkgname = pkg_data["basic_stats"]["pkgname"]
-  shared_libs = set(GetSharedLibs(pkg_data))
+  shared_libs = set(su.GetSharedLibs(pkg_data))
   for binary_info in pkg_data["binaries_dump_info"]:
     if binary_info["path"] in shared_libs:
       if su.IsLibraryLinkable(binary_info["path"]):

Modified: csw/mgar/gar/v2/lib/python/sharedlib_utils.py
===================================================================
--- csw/mgar/gar/v2/lib/python/sharedlib_utils.py	2010-10-10 20:31:00 UTC (rev 11209)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils.py	2010-10-10 20:31:29 UTC (rev 11210)
@@ -1,3 +1,5 @@
+# $Id$
+
 import re
 import os.path
 
@@ -23,3 +25,14 @@
       "%(basename)s-%(version)s" % keywords,
   ]
   return pkgname_list, catalogname_list
+
+
+def GetSharedLibs(pkg_data):
+  # Finding all shared libraries
+  shared_libs = []
+  for metadata in pkg_data["files_metadata"]:
+    if "mime_type" in metadata and metadata["mime_type"]:
+      # TODO: Find out where mime_type is missing and why
+      if "sharedlib" in metadata["mime_type"]:
+        shared_libs.append(metadata["path"])
+  return shared_libs


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