[yum-git] Branch 'yum-3_2_X' - yum/__init__.py

Seth Vidal skvidal at linux.duke.edu
Fri Jun 13 20:57:09 UTC 2008


 yum/__init__.py |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit a7ca0463e4c5148862536fe2cc151fff9c91683a
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Fri Jun 13 16:56:45 2008 -0400

    make sure we don't accidentally install any incompatible architectures (especially things
    like local-install src rpms)

diff --git a/yum/__init__.py b/yum/__init__.py
index b9bdabc..1fe5378 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2536,6 +2536,13 @@ class YumBase(depsolve.Depsolve):
             self.verbose_logger.log(logginglevels.INFO_2,
                 _('Examining %s: %s'), po.localpath, po)
 
+        # if by any chance we're a noncompat arch rpm - bail and throw out an error
+        # FIXME -our archlist should be stored somewhere so we don't have to
+        # do this: but it's not a config file sort of thing
+        if po.arch not in rpmUtils.arch.getArchList():
+            critical(_('Cannot add package %s to transaction. Not a compatible architecture: %s'), pkg, po.arch)
+            return result
+        
         # everything installed that matches the name
         installedByKey = self.rpmdb.searchNevra(name=po.name)
         # go through each package



More information about the Yum-cvs-commits mailing list