summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-01-13 13:22:14 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-01-13 13:22:14 +0000
commitb8969cc472d95061d89f3b2f9df11b39798f4b77 (patch)
treee6c5b12f4c22b2e272b19581d1e9e3dbe55295d6 /src
parentc953c93084872820aa33dc3d38af1ddfe80f86ca (diff)
downloadbcfg2-b8969cc472d95061d89f3b2f9df11b39798f4b77.tar.gz
bcfg2-b8969cc472d95061d89f3b2f9df11b39798f4b77.tar.bz2
bcfg2-b8969cc472d95061d89f3b2f9df11b39798f4b77.zip
SYSV support for version=any (patch from adeason) (Resolves Ticket #632)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5019 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/SYSV.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/SYSV.py b/src/lib/Client/Tools/SYSV.py
index c6061366d..22acb91ad 100644
--- a/src/lib/Client/Tools/SYSV.py
+++ b/src/lib/Client/Tools/SYSV.py
@@ -54,14 +54,19 @@ class SYSV(Bcfg2.Client.Tools.PkgTool):
if not entry.get('version'):
self.logger.info("Insufficient information of Package %s; cannot Verify" % entry.get('name'))
return False
+
+ desiredVersion = entry.get('version')
+ if desiredVersion == 'any':
+ desiredVersion = self.installed.get(entry.get('name'), desiredVersion)
+
cmdrc = self.cmd.run("/usr/bin/pkginfo -q -v \"%s\" %s" % \
- (entry.get('version'), entry.get('name')))[0]
+ (desiredVersion, entry.get('name')))[0]
if cmdrc != 0:
if entry.get('name') in self.installed:
self.logger.debug("Package %s version incorrect: have %s want %s" \
% (entry.get('name'), self.installed[entry.get('name')],
- entry.get('version')))
+ desiredVersion))
else:
self.logger.debug("Package %s not installed" % (entry.get("name")))
else: