[csw-devel] SF.net SVN: gar:[21196] csw/mgar/gar/v2/lib/python
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun May 26 11:05:41 CEST 2013
Revision: 21196
http://gar.svn.sourceforge.net/gar/?rev=21196&view=rev
Author: wahwah
Date: 2013-05-26 09:05:37 +0000 (Sun, 26 May 2013)
Log Message:
-----------
checkpkg: It's "64-bit binaries".
A style change.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/package_checks.py
csw/mgar/gar/v2/lib/python/package_checks_test.py
Modified: csw/mgar/gar/v2/lib/python/package_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks.py 2013-05-25 12:23:35 UTC (rev 21195)
+++ csw/mgar/gar/v2/lib/python/package_checks.py 2013-05-26 09:05:37 UTC (rev 21196)
@@ -1226,14 +1226,15 @@
"file=%s" % shared_lib)
-def Check64bitsBinariesPresence(pkg_data, error_mgr, logger, messenger):
+def Check64bitBinariesPresence(pkg_data, error_mgr, logger, messenger):
pkginfo = pkg_data['pkginfo']
+ arch = pkginfo['ARCH']
if not ('OPENCSW_MODE64' in pkginfo and '64' in pkginfo['OPENCSW_MODE64']):
return
if 'isaexec' in pkginfo['OPENCSW_MODE64']:
binaries = pkg_data['binaries_dump_info']
- binaries_path = 'bin|sbin|lib|libexec'
+ binaries_path = '|'.join(common_constants.BASE_BINARY_PATHS)
else:
binaries = [ x for x in pkg_data['binaries_dump_info'] if 'soname' in x ]
binaries_path = 'lib|libexec'
@@ -1245,15 +1246,16 @@
}
paths_64_str = (
r"opt/csw/(%s)/(%s)"
- % (binaries_path, '|'.join(paths_64[pkginfo['ARCH']])))
+ % (binaries_path, '|'.join(paths_64[arch])))
paths_64_re = re.compile(paths_64_str)
for binary_info in binaries:
if paths_64_re.search(binary_info['path']):
return
- error_mgr.ReportError('64bits-binaries-missing')
+ error_mgr.ReportError('64-bit-binaries-missing')
messenger.Message(
- "The package is supposed to contains 64 bits binaries "
- "but it doesn't contain any in the usual 64 bits "
- "binaries locations. Locations checked: %s." % paths_64_str)
-
+ "The package contains 32-bit binaries, e.g. %s, "
+ "but it doesn't seem to contain any 64-bit binaries "
+ "in the usual locations. "
+ "Locations checked for 64-bit binaries: %s."
+ % (binaries[0], paths_64_str))
Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py 2013-05-25 12:23:35 UTC (rev 21195)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py 2013-05-26 09:05:37 UTC (rev 21196)
@@ -1977,24 +1977,24 @@
self.error_mgr_mock.ReportError(
'shared-library-missing-dot-so', 'file=foo.1')
-class TestCheck64bitsBinariesPresence(CheckTestHelper, unittest.TestCase):
- FUNCTION_NAME = 'Check64bitsBinariesPresence'
+class TestCheck64bitBinariesPresence(CheckTestHelper, unittest.TestCase):
+ FUNCTION_NAME = 'Check64bitBinariesPresence'
def testFull32bitsPackage(self):
self.pkg_data = copy.deepcopy(vsftpd_stats[0])
- def testMissingIntel64bitsLibraries(self):
+ def testMissingIntel64bitLibraries(self):
self.pkg_data = copy.deepcopy(neon_stats[0])
- self.error_mgr_mock.ReportError('64bits-binaries-missing')
+ self.error_mgr_mock.ReportError('64-bit-binaries-missing')
- def testMissingSparc64bitsLibraries(self):
+ def testMissingSparc64bitLibraries(self):
self.pkg_data = copy.deepcopy(neon_stats[0])
self.pkg_data["pkginfo"]["OPENCSW_MODE64"] = '32/64'
- self.error_mgr_mock.ReportError('64bits-binaries-missing')
+ self.error_mgr_mock.ReportError('64-bit-binaries-missing')
- def testMissing64bitsExecutable(self):
+ def testMissing64bitExecutable(self):
self.pkg_data = bdb48_stats[0]
self.pkg_data["pkginfo"]["OPENCSW_MODE64"] = '32/64/isaexec'
- self.error_mgr_mock.ReportError('64bits-binaries-missing')
+ self.error_mgr_mock.ReportError('64-bit-binaries-missing')
class TestRemovePackagesUnderInstallation(unittest.TestCase):
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