diff options
author | Jack Neely <jjneely@ncsu.edu> | 2010-09-22 21:07:55 +0000 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2010-09-26 15:27:08 -0500 |
commit | 46d0a9670763f6c8673adad35be3e110c05ec7af (patch) | |
tree | b18803aa51e18c34b547985f01baf8373e3c88f5 /src/lib/Client/Tools/YUMng.py | |
parent | d57ed55d8effce27305e2d5e8fdd99cfe930ac42 (diff) | |
download | bcfg2-46d0a9670763f6c8673adad35be3e110c05ec7af.tar.gz bcfg2-46d0a9670763f6c8673adad35be3e110c05ec7af.tar.bz2 bcfg2-46d0a9670763f6c8673adad35be3e110c05ec7af.zip |
YUMng: correct the __req__
Catch possible traceback if we are handed an instance not in our list. (This
seems to be a bug with duplicate instances.)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@6065 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/YUMng.py')
-rw-r--r-- | src/lib/Client/Tools/YUMng.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py index ae93f4fae..077d71508 100644 --- a/src/lib/Client/Tools/YUMng.py +++ b/src/lib/Client/Tools/YUMng.py @@ -132,22 +132,9 @@ class YUMng(Bcfg2.Client.Tools.PkgTool): ('Package', 'rpm'), ('Path', 'ignore')] - __req__ = {'Package': ['name', 'version'], + __req__ = {'Package': ['name'], 'Path': ['type']} __ireq__ = {'Package': ['name']} - #__ireq__ = {'Package': ['name', 'version']} - - __new_req__ = {'Package': ['name'], 'Instance': ['version', 'release', 'arch']} - __new_ireq__ = {'Package': ['name'], \ - 'Instance': []} - #__new_ireq__ = {'Package': ['name', 'uri'], \ - # 'Instance': ['simplefile', 'version', 'release', 'arch']} - - __gpg_req__ = {'Package': ['name', 'version']} - __gpg_ireq__ = {'Package': ['name', 'version']} - - __new_gpg_req__ = {'Package': ['name'], 'Instance': ['version', 'release']} - __new_gpg_ireq__ = {'Package': ['name'], 'Instance': ['version', 'release']} conflicts = ['RPMng'] @@ -731,6 +718,11 @@ class YUMng(Bcfg2.Client.Tools.PkgTool): if pinst.tag in ['Instance', 'Package']] if insts: for inst in insts: + if inst not in self.instance_status: + m = " Asked to install/update package never verified" + p = nevraString(build_yname(pkg.get('name'), inst)) + self.logger.warning("%s: %s" % (m, p)) + continue status = self.instance_status[inst] if not status.get('installed', False) and self.doInstall: queuePkg(pkg, inst, install_pkgs) |