Skip to content

Instantly share code, notes, and snippets.

@jjneely
Created June 22, 2011 18:14
Show Gist options
  • Save jjneely/1040726 to your computer and use it in GitHub Desktop.
Save jjneely/1040726 to your computer and use it in GitHub Desktop.
YUMng and verifying multiarch packages
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py
index 6aab981..24605ca 100644
--- a/src/lib/Client/Tools/YUMng.py
+++ b/src/lib/Client/Tools/YUMng.py
@@ -451,8 +451,13 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
verify_flags = inst.get('verify_flags', self.verifyFlags)
verify_flags = verify_flags.lower().replace(' ', ',').split(',')
- if len(POs) == 0:
- # Package not installed
+ if 'arch' in nevra:
+ # If arch is specified use it to select the package
+ _POs = [ p for p in POs if p.arch == nevra['arch'] ]
+ else:
+ _POs = POs
+ if len(_POs) == 0:
+ # Package (name, arch) not installed
self.logger.debug(" %s is not installed" % nevraString(nevra))
stat['installed'] = False
package_fail = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment