[csw-devel] SF.net SVN: gar:[7792] csw/mgar/gar/v2-checkpkg/bin/checkpkg.d
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Wed Dec 30 10:48:25 CET 2009
Revision: 7792
http://gar.svn.sourceforge.net/gar/?rev=7792&view=rev
Author: wahwah
Date: 2009-12-30 09:48:25 +0000 (Wed, 30 Dec 2009)
Log Message:
-----------
mGAR v2-checkpkg: Better symlink emulation
Modified Paths:
--------------
csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py
csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py
Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py 2009-12-30 00:32:38 UTC (rev 7791)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg.py 2009-12-30 09:48:25 UTC (rev 7792)
@@ -330,9 +330,9 @@
"""
symlinked_list = []
for runpath in runpath_list:
- if runpath.endswith("/64"):
- symlinked_list.append("%s/amd64" % runpath[:-3])
- symlinked_list.append("%s/sparcv9" % runpath[:-3])
+ if "/64" in runpath:
+ symlinked_list.append(runpath.replace("/64", "/amd64"))
+ symlinked_list.append(runpath.replace("/64", "/sparcv9"))
else:
symlinked_list.append(runpath)
return symlinked_list
Modified: csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py
===================================================================
--- csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py 2009-12-30 00:32:38 UTC (rev 7791)
+++ csw/mgar/gar/v2-checkpkg/bin/checkpkg.d/checkpkg_test.py 2009-12-30 09:48:25 UTC (rev 7792)
@@ -264,6 +264,17 @@
expected = ["/opt/csw/mysql5/lib/foo/mysql", "/opt/csw/mysql5/lib/bar/mysql"]
self.assertEquals(expected, checkpkg.ExpandRunpath(runpath, isalist))
+ def testEmulate64BitSymlinks_1(self):
+ runpath_list = ["/opt/csw/mysql5/lib/foo/mysql/64"]
+ expected = "/opt/csw/mysql5/lib/foo/mysql/amd64"
+ self.assertTrue(expected in checkpkg.Emulate64BitSymlinks(runpath_list))
+
+ def testEmulate64BitSymlinks_2(self):
+ runpath_list = ["/opt/csw/mysql5/lib/64/mysql/foo"]
+ expected = "/opt/csw/mysql5/lib/amd64/mysql/foo"
+ result = checkpkg.Emulate64BitSymlinks(runpath_list)
+ self.assertTrue(expected in result, "%s not in %s" % (expected, result))
+
def testGetLinesBySoname(self):
expected = {'foo.so.1': '/opt/csw/lib/isa-value-1/foo.so.1 foo'}
pkgmap = self.pkgmap_mocker.CreateMock(checkpkg.SystemPkgmap)
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