[csw-devel] SF.net SVN: gar:[11221] csw/mgar/gar/v2/lib/python/sharedlib_utils.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Oct 10 22:37:00 CEST 2010
Revision: 11221
http://gar.svn.sourceforge.net/gar/?rev=11221&view=rev
Author: wahwah
Date: 2010-10-10 20:36:59 +0000 (Sun, 10 Oct 2010)
Log Message:
-----------
mGAR v2: checkpkg, implemented MakePackageNameBySonameCollection
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/sharedlib_utils.py
Modified: csw/mgar/gar/v2/lib/python/sharedlib_utils.py
===================================================================
--- csw/mgar/gar/v2/lib/python/sharedlib_utils.py 2010-10-10 20:36:33 UTC (rev 11220)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils.py 2010-10-10 20:36:59 UTC (rev 11221)
@@ -1,5 +1,6 @@
# $Id$
+import copy
import re
import os.path
@@ -132,12 +133,19 @@
# to the pkgname and soname at the end of the function.
if candidate.startswith("lib"):
candidate = candidate[3:]
- m = SONAME_VERSION_RE.search(candidate)
+ m = re.search("\.so", candidate)
+ candidate = re.sub("\.so.*$", "", candidate)
common_substring_candidates.append(candidate)
- lcs = CollectionLongestCommonSubstring(common_substring_candidates)
- pkgname = "CSWlib%s.%s" % (SanitizeWithChar(lcs, "-"), common_version)
- catalogname = "lib%s.%s" % (SanitizeWithChar(lcs, "_"), common_version)
- return pkgname, catalogname
+ lcs = CollectionLongestCommonSubstring(copy.copy(common_substring_candidates))
+ pkgnames = [
+ "CSW" + SanitizeWithChar("lib%s%s" % (lcs, common_version), "-"),
+ "CSW" + SanitizeWithChar("lib%s-%s" % (lcs, common_version), "-"),
+ ]
+ catalognames = [
+ SanitizeWithChar("lib%s%s" % (lcs, common_version), "_"),
+ SanitizeWithChar("lib%s_%s" % (lcs, common_version), "_"),
+ ]
+ return pkgnames, catalognames
def LongestCommonSubstring(S, T):
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