[csw-devel] SF.net SVN: gar:[8813] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Thu Feb 25 15:57:47 CET 2010
Revision: 8813
http://gar.svn.sourceforge.net/gar/?rev=8813&view=rev
Author: wahwah
Date: 2010-02-25 14:57:47 +0000 (Thu, 25 Feb 2010)
Log Message:
-----------
mGAR v2: checkpkg, fixed ldd parsing output.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/checkpkg.py
csw/mgar/gar/v2/lib/python/checkpkg_test.py
Modified: csw/mgar/gar/v2/lib/python/checkpkg.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg.py 2010-02-25 14:57:18 UTC (rev 8812)
+++ csw/mgar/gar/v2/lib/python/checkpkg.py 2010-02-25 14:57:47 UTC (rev 8813)
@@ -1124,7 +1124,8 @@
found_re = r"^\t(?P<soname>\S+)\s+=>\s+(?P<path_found>\S+)"
symbol_not_found_re = r"^\tsymbol not found:\s(?P<symbol>\S+)\s+\((?P<path_not_found>\S+)\)"
only_so = r"^\t(?P<path_only>\S+)$"
- common_re = r"(%s|%s|%s)" % (found_re, symbol_not_found_re, only_so)
+ version_so = r'^\t(?P<soname_version_not_found>\S+) \((?P<lib_name>\S+)\) =>\t \(version not found\)'
+ common_re = r"(%s|%s|%s|%s)" % (found_re, symbol_not_found_re, only_so, version_so)
m = re.match(common_re, line)
response = {}
if m:
@@ -1145,6 +1146,11 @@
response["soname"] = None
response["path"] = d["path_only"]
response["symbol"] = None
+ elif d["soname_version_not_found"]:
+ response["state"] = "version-not-found"
+ response["soname"] = d["soname_version_not_found"]
+ response["path"] = None
+ response["symbol"] = None
else:
raise StdoutSyntaxError("Could not parse %s" % repr(line))
else:
Modified: csw/mgar/gar/v2/lib/python/checkpkg_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/checkpkg_test.py 2010-02-25 14:57:18 UTC (rev 8812)
+++ csw/mgar/gar/v2/lib/python/checkpkg_test.py 2010-02-25 14:57:47 UTC (rev 8813)
@@ -40,6 +40,7 @@
\tsymbol not found: UtfToLocal (/opt/csw/lib/postgresql/8.4/utf8_and_gbk.so)
\tlibm.so.2 => /lib/libm.so.2
\t/usr/lib/secure/s8_preload.so.1
+\tlibXext.so.0 (SUNW_1.1) =>\t (version not found)
"""
class DependenciesUnitTest_1(unittest.TestCase):
@@ -810,6 +811,16 @@
}
self.assertEqual(expected, self.pkgstats._ParseLddDashRline(line))
+ def test_ParseLdd_VersionNotFound(self):
+ line = '\tlibXext.so.0 (SUNW_1.1) =>\t (version not found)'
+ expected = {
+ 'symbol': None,
+ 'soname': 'libXext.so.0',
+ 'path': None,
+ 'state': 'version-not-found',
+ }
+ self.assertEqual(expected, self.pkgstats._ParseLddDashRline(line))
+
def test_ParseLddDashRlineManyLines(self):
for line in LDD_R_OUTPUT_1.splitlines():
parsed = self.pkgstats._ParseLddDashRline(line)
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