[yum-git] yum/__init__.py

Seth Vidal skvidal at linux.duke.edu
Fri Jun 13 20:52:55 UTC 2008


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

New commits:
commit f9f7e5006722b7c3d41b6aae01c9be91468f1649
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Fri Jun 13 16:52:09 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 1d26d38..d727dcd 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2501,6 +2501,13 @@ class YumBase(depsolve.Depsolve):
                 return result
             vdebug2(_('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