summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorMike Brady <mike.brady@devnull.net.nz>2007-08-29 10:02:18 +0000
committerMike Brady <mike.brady@devnull.net.nz>2007-08-29 10:02:18 +0000
commit9114a6ef76eb97064d9e2397c33cf3614fe7d5d8 (patch)
tree723d5ef2c9865e4bb4c3a20135b7b7342ca5d23f /src/lib/Client
parent67fa34d621b0eedae7d30b9b3840ff29f6ebbaac (diff)
downloadbcfg2-9114a6ef76eb97064d9e2397c33cf3614fe7d5d8.tar.gz
bcfg2-9114a6ef76eb97064d9e2397c33cf3614fe7d5d8.tar.bz2
bcfg2-9114a6ef76eb97064d9e2397c33cf3614fe7d5d8.zip
RPMng/YUMng: Added check to canInstall to make sure that the Package entry was verifiable
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3656 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Tools/RPMng.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/Client/Tools/RPMng.py b/src/lib/Client/Tools/RPMng.py
index 15f51ab79..3b4e7cfc0 100644
--- a/src/lib/Client/Tools/RPMng.py
+++ b/src/lib/Client/Tools/RPMng.py
@@ -684,6 +684,13 @@ class RPMng(Bcfg2.Client.Tools.PkgTool):
instances = entry.findall('Instance')
+ # If the entry wasn't verifiable, then we really don't want to try and fix something
+ # that we don't know is broken.
+ if not self.canVerify(entry):
+ self.logger.debug("WARNING: Package %s was not verifiable, not passing to Install()" \
+ % entry.get('name'))
+ return False
+
if not instances:
# Old non Instance format, unmodified.
if entry.get('name') == 'gpg-pubkey':