SF.net SVN: gar:[23209] csw/mgar/gar/v2/lib/python/package_checks.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Mar 13 11:07:41 CET 2014


Revision: 23209
          http://sourceforge.net/p/gar/code/23209
Author:   wahwah
Date:     2014-03-13 10:07:41 +0000 (Thu, 13 Mar 2014)
Log Message:
-----------
checkpkg: Fix a crash when ARCH=all contains bins

There was an assumption in the check function that only 'i386' or
'sparc' would contain binaries.

But every check has to run for every package, so this assumption must
not be made.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/package_checks.py

Modified: csw/mgar/gar/v2/lib/python/package_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks.py	2014-03-13 10:07:33 UTC (rev 23208)
+++ csw/mgar/gar/v2/lib/python/package_checks.py	2014-03-13 10:07:41 UTC (rev 23209)
@@ -1273,9 +1273,17 @@
 
 
 def Check64bitBinariesPresence(pkg_data, error_mgr, logger, messenger):
+  paths_64 = {
+      common_constants.ARCH_i386: common_constants.AMD64_PATHS,
+      common_constants.ARCH_SPARC: common_constants.SPARCV9_PATHS,
+  }
+
   pkginfo = pkg_data['pkginfo']
   arch = pkginfo['ARCH']
 
+  if arch not in paths_64:
+    return
+
   if 'OPENCSW_MODE64' not in pkginfo:
     error_mgr.ReportError('pkginfo-opencsw-mode64-missing',
                           'OPENCSW_MODE64 is missing from pkginfo')
@@ -1297,10 +1305,6 @@
   if not binaries:
     return
 
-  paths_64 = {
-      'i386': common_constants.AMD64_PATHS,
-      'sparc': common_constants.SPARCV9_PATHS,
-  }
   paths_64_str = (
       r"opt/csw/(%s)/(%s)"
       % (binaries_path, '|'.join(paths_64[arch])))

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