summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-10-24 17:51:08 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-10-24 17:51:08 +0000
commita8e9519ed12e59f20c8591d886908bb85ea17acf (patch)
tree193d922fd49a8945e06a5365b2f98fc962853700 /src/lib/Client
parenta9cd2fd0099bcd47852d1a5c262cd0c55a6e59a8 (diff)
downloadbcfg2-a8e9519ed12e59f20c8591d886908bb85ea17acf.tar.gz
bcfg2-a8e9519ed12e59f20c8591d886908bb85ea17acf.tar.bz2
bcfg2-a8e9519ed12e59f20c8591d886908bb85ea17acf.zip
RPMng: Fix package verification when verify=false
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5497 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Tools/RPMng.py28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/lib/Client/Tools/RPMng.py b/src/lib/Client/Tools/RPMng.py
index a575a5c34..f53fbcce6 100644
--- a/src/lib/Client/Tools/RPMng.py
+++ b/src/lib/Client/Tools/RPMng.py
@@ -208,6 +208,8 @@ class RPMng(Bcfg2.Client.Tools.PkgTool):
version, release = entry.get('version').split('-')
instance.set('version', version)
instance.set('release', release)
+ if entry.get('verify', 'true') == 'false':
+ instance.set('verify', 'false')
instances = [ instance ]
self.logger.debug("Verifying package instances for %s" % entry.get('name'))
@@ -253,11 +255,14 @@ class RPMng(Bcfg2.Client.Tools.PkgTool):
flags += ['nomd5']
self.logger.debug(" verify_flags = %s" % flags)
- vp_ts = rpmtools.rpmtransactionset()
- self.instance_status[inst]['verify'] = \
- rpmtools.rpm_verify( vp_ts, pkg, flags)
- vp_ts.closeDB()
- del vp_ts
+ if inst.get('verify', 'true') == 'false':
+ self.instance_status[inst]['verify'] = None
+ else:
+ vp_ts = rpmtools.rpmtransactionset()
+ self.instance_status[inst]['verify'] = \
+ rpmtools.rpm_verify( vp_ts, pkg, flags)
+ vp_ts.closeDB()
+ del vp_ts
if self.instance_status[inst]['installed'] == False:
self.logger.info(" Package %s %s not installed." % \
@@ -309,11 +314,14 @@ class RPMng(Bcfg2.Client.Tools.PkgTool):
flags += ['nomd5']
self.logger.debug(" verify_flags = %s" % flags)
- vp_ts = rpmtools.rpmtransactionset()
- self.instance_status[inst]['verify'] = \
- rpmtools.rpm_verify( vp_ts, pkg, flags )
- vp_ts.closeDB()
- del vp_ts
+ if inst.get('verify', 'true') == 'false':
+ self.instance_status[inst]['verify'] = None
+ else:
+ vp_ts = rpmtools.rpmtransactionset()
+ self.instance_status[inst]['verify'] = \
+ rpmtools.rpm_verify( vp_ts, pkg, flags )
+ vp_ts.closeDB()
+ del vp_ts
else:
# Wrong version installed.