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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue Oct 26 11:34:06 CEST 2010


Revision: 11415
          http://gar.svn.sourceforge.net/gar/?rev=11415&view=rev
Author:   wahwah
Date:     2010-10-26 09:34:06 +0000 (Tue, 26 Oct 2010)

Log Message:
-----------
mGAR v2: checkpkg libpolicy, try the version with custom prefixes checked as well.

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-26 09:33:38 UTC (rev 11414)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils.py	2010-10-26 09:34:06 UTC (rev 11415)
@@ -26,7 +26,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(/[a-z-_]+)?/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-26 09:33:38 UTC (rev 11414)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py	2010-10-26 09:34:06 UTC (rev 11415)
@@ -30,10 +30,6 @@
   def testIsLibraryLinkableAmd64(self):
     self.assertTrue(su.IsLibraryLinkable("opt/csw/lib/amd64/libfoo.so.0.2"))
 
-  def testIsLibraryLinkablePrefix(self):
-    self.assertFalse(
-        su.IsLibraryLinkable("opt/csw/customprefix/lib/libfoo.so.0.2"))
-
   def testIsLibraryLinkableLibexecFalse(self):
     p = "opt/csw/libexec/bar"
     self.assertEqual(False, su.IsLibraryLinkable(p))
@@ -47,20 +43,24 @@
     self.assertEqual(False, su.IsLibraryLinkable(p))
 
   def testIsLibraryLinkablePrivateLib(self):
-    self.assertEqual(False, su.IsLibraryLinkable(
+    self.assertFalse(su.IsLibraryLinkable(
       "opt/csw/lib/erlang/lib/megaco-3.6.0.1/priv/lib"
       "/megaco_flex_scanner_drv_mt.so"))
 
   def testIsLibraryLinkableInShared(self):
-    self.assertEqual(False, su.IsLibraryLinkable(
+    self.assertFalse(su.IsLibraryLinkable(
       "opt/csw/share/Adobe/Reader8/Reader/sparcsolaris/lib"
       "/libcrypto.so.0.9.6"))
 
+  def testIsLibraryLinkablePrefix(self):
+    self.assertTrue(
+        su.IsLibraryLinkable("opt/csw/customprefix/lib/libfoo.so.0.2"))
+
   def testIsLibraryLinkableInPrefix(self):
     """This could be considered linkable.
-    
+
     Reason: It has the form of "/opt/csw/foo/lib/libfoo.so.1"."""
-    self.assertEqual(False, su.IsLibraryLinkable(
+    self.assertTrue(su.IsLibraryLinkable(
       "opt/csw/boost-gcc/lib"
       "/libboost_wserialization.so.1.44.0"))
 
@@ -151,6 +151,7 @@
     expected = (
         ['CSWlibgettextlib-0-14-1'],
         ['libgettextlib_0_14_1'],
+    )
 
   def testMakePackageNameDashesNoDashes(self):
     soname = "libpyglib-2.0-python.so.0"


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