diff options
author | Jack Neely <jjneely@ncsu.edu> | 2010-08-18 21:00:27 +0000 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2010-08-18 18:39:45 -0500 |
commit | 41f21b7bb315a6cb8ceef0d4d065b90869a5d848 (patch) | |
tree | a278fd8e241c128f467b272208939e49e4972604 /src | |
parent | 418df2decf40b4f95675f249b5c1250beecaea6d (diff) | |
download | bcfg2-41f21b7bb315a6cb8ceef0d4d065b90869a5d848.tar.gz bcfg2-41f21b7bb315a6cb8ceef0d4d065b90869a5d848.tar.bz2 bcfg2-41f21b7bb315a6cb8ceef0d4d065b90869a5d848.zip |
YUMng: All gpg-pubkey must be in the proper work queue to be installed.
gpg-pubkeys are not packages, yet we treat them as so. They require
special handling for all install/upgrades/etc. This corrects a
condition where gpg-pubkeys were "upgraded" rather than "installed."
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@6027 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Client/Tools/YUMng.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py index 361b05d03..42b291141 100644 --- a/src/lib/Client/Tools/YUMng.py +++ b/src/lib/Client/Tools/YUMng.py @@ -563,12 +563,18 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): entry is set to True. """ - self.logger.info('Running YUMng.Install()') + self.logger.debug('Running YUMng.Install()') install_pkgs = [] gpg_keys = [] upgrade_pkgs = [] + def queuePkg(pkg, inst, queue): + if pkg.get('name') == 'gpg-pubkey': + gpg_keys.append(inst) + else: + queue.append(inst) + # Remove extra instances. # Can not reverify because we don't have a package entry. if self.extra_instances is not None and len(self.extra_instances) > 0: @@ -592,15 +598,12 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng): if self.FixInstance(inst, self.instance_status[inst]): if self.instance_status[inst].get('installed', False) \ == False: - if pkg.get('name') == 'gpg-pubkey': - gpg_keys.append(inst) - else: - install_pkgs.append(inst) + queuePkg(pkg, inst, install_pkgs) elif self.instance_status[inst].get('version_fail', \ False) == True: - upgrade_pkgs.append(inst) + queuePkg(pkg, inst, upgrade_pkgs) else: - install_pkgs.append(pkg) + queuePkg(pkg, inst, install_pkgs) # Install GPG keys. # Alternatively specify the required keys using 'gpgkey' in the |