summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/YUMng.py
diff options
context:
space:
mode:
authorJack Neely <jjneely@ncsu.edu>2011-06-22 14:10:31 -0400
committerJack Neely <jjneely@ncsu.edu>2011-06-22 14:10:31 -0400
commitb4c708c2f9ea913d28c2c8bc75c65c525b00c7ed (patch)
treeb64ef31051c98dadd723579607a26382ee1e0b1f /src/lib/Client/Tools/YUMng.py
parent837142c765b99035821cc08f171b231eba55639e (diff)
downloadbcfg2-b4c708c2f9ea913d28c2c8bc75c65c525b00c7ed.tar.gz
bcfg2-b4c708c2f9ea913d28c2c8bc75c65c525b00c7ed.tar.bz2
bcfg2-b4c708c2f9ea913d28c2c8bc75c65c525b00c7ed.zip
YUMng: arch may not be specified
If the arch is specified use it to select the package in VerifyPackage() otherwise just work with the default arch.
Diffstat (limited to 'src/lib/Client/Tools/YUMng.py')
-rw-r--r--src/lib/Client/Tools/YUMng.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py
index 08cfd3289..24605ca44 100644
--- a/src/lib/Client/Tools/YUMng.py
+++ b/src/lib/Client/Tools/YUMng.py
@@ -451,7 +451,12 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
verify_flags = inst.get('verify_flags', self.verifyFlags)
verify_flags = verify_flags.lower().replace(' ', ',').split(',')
- if len([ p for p in POs if p.arch == nevra['arch'] ]) == 0:
+ 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