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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Oct 10 22:35:47 CEST 2010


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

Log Message:
-----------
mGAR v2: checkpkg, shared lib policy, libraries under nonstandard (not /opt/csw/) prefixes are not considered linkable.

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

Modified: csw/mgar/gar/v2/lib/python/sharedlib_utils.py
===================================================================
--- csw/mgar/gar/v2/lib/python/sharedlib_utils.py	2010-10-10 20:35:20 UTC (rev 11218)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils.py	2010-10-10 20:35:47 UTC (rev 11219)
@@ -21,7 +21,7 @@
                   + INTEL_386_PATHS + AMD64_PATHS)
   # Need to escape the plus signs because of the regex usage below.
   arch_subdirs = [x.replace(r"+", r"\+") for x in arch_subdirs]
-  linkable_re = re.compile(r"^opt/csw(/([^\/]+))*/lib(/(%s))?$"
+  linkable_re = re.compile(r"^opt/csw/lib(/(%s))?$"
                            % "|".join(arch_subdirs))
   blacklist = [
       # If it has two lib components, it's a private lib.

Modified: csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py	2010-10-10 20:35:20 UTC (rev 11218)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py	2010-10-10 20:35:47 UTC (rev 11219)
@@ -27,8 +27,8 @@
     self.assertTrue(su.IsLibraryLinkable("opt/csw/lib/amd64/libfoo.so.0.2"))
 
   def testIsLibraryLinkablePrefix(self):
-    p = "opt/csw/customprefix/lib/libfoo.so.0.2"
-    self.assertTrue(su.IsLibraryLinkable(p))
+    self.assertFalse(
+        su.IsLibraryLinkable("opt/csw/customprefix/lib/libfoo.so.0.2"))
 
   def testIsLibraryLinkableLibexecFalse(self):
     p = "opt/csw/libexec/bar"


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