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

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon Jan 4 15:04:53 CET 2016


Revision: 25516
          http://sourceforge.net/p/gar/code/25516
Author:   dmichelsen
Date:     2016-01-04 14:04:52 +0000 (Mon, 04 Jan 2016)
Log Message:
-----------
mGAR v2: Do not bail out on unknown ISA in files

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	2016-01-02 18:42:32 UTC (rev 25515)
+++ csw/mgar/gar/v2/lib/python/package_checks.py	2016-01-04 14:04:52 UTC (rev 25516)
@@ -950,14 +950,22 @@
   for file_metadata in files_metadata:
     file_metadata = representations.FileMetadata._make(file_metadata)
     if su.IsBinary(file_metadata._asdict()):
-      machine = MACHINE_ID_METADATA[file_metadata.machine_id]
-      if machine["type"] != pkginfo_arch:
+      if file_metadata.machine_id in MACHINE_ID_METADATA:
+        machine = MACHINE_ID_METADATA[file_metadata.machine_id]
+        if machine["type"] != pkginfo_arch:
+          error_mgr.ReportError(
+              "binary-wrong-architecture",
+              "file=%s pkginfo-says=%s actual-binary=%s" % (
+                file_metadata.path,
+                pkginfo_arch,
+                machine["type"]))
+      else:
         error_mgr.ReportError(
             "binary-wrong-architecture",
             "file=%s pkginfo-says=%s actual-binary=%s" % (
               file_metadata.path,
               pkginfo_arch,
-              machine["type"]))
+              file_metadata.machine_id))
 
 
 def CheckSharedLibraryNamingPolicy(pkg_data, error_mgr, logger, messenger):

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