diff options
author | Jack Neely <jjneely@ncsu.edu> | 2011-06-22 14:10:31 -0400 |
---|---|---|
committer | Jack Neely <jjneely@ncsu.edu> | 2011-06-22 14:10:31 -0400 |
commit | b4c708c2f9ea913d28c2c8bc75c65c525b00c7ed (patch) | |
tree | b64ef31051c98dadd723579607a26382ee1e0b1f | |
parent | 837142c765b99035821cc08f171b231eba55639e (diff) | |
download | bcfg2-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.
-rw-r--r-- | src/lib/Client/Tools/YUMng.py | 7 |
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 |