summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuke Cyca <me@lukecyca.com>2012-04-16 14:39:38 -0700
committerLuke Cyca <me@lukecyca.com>2012-04-16 14:39:38 -0700
commit0ec333243a90cce12f12397dd95ed13a89d36ea0 (patch)
tree3023505ae7d87093a5379ae7ce975fec0ba89b91 /src
parent3be82d87b4463d0f421d65de08d9377e178a0ff0 (diff)
downloadbcfg2-0ec333243a90cce12f12397dd95ed13a89d36ea0.tar.gz
bcfg2-0ec333243a90cce12f12397dd95ed13a89d36ea0.tar.bz2
bcfg2-0ec333243a90cce12f12397dd95ed13a89d36ea0.zip
MacPorts now respects version="any" and logs version mismatches like other plugins.
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Tools/MacPorts.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/Client/Tools/MacPorts.py b/src/lib/Client/Tools/MacPorts.py
index e84d3e553..2a7ba9eb9 100644
--- a/src/lib/Client/Tools/MacPorts.py
+++ b/src/lib/Client/Tools/MacPorts.py
@@ -38,13 +38,20 @@ class MacPorts(Bcfg2.Client.Tools.PkgTool):
return False
if entry.attrib['name'] in self.installed:
- if self.installed[entry.attrib['name']] == entry.attrib['version']:
+ if (self.installed[entry.attrib['name']] == entry.attrib['version'] or
+ entry.attrib['version'] == 'any'):
#if not self.setup['quick'] and \
# entry.get('verify', 'true') == 'true':
#FIXME: We should be able to check this once
# http://trac.macports.org/ticket/15709 is implemented
return True
else:
+ self.logger.info(" %s: Wrong version installed. "
+ "Want %s, but have %s" % (entry.get("name"),
+ entry.get("version"),
+ self.installed[entry.get("name")],
+ ))
+
entry.set('current_version', self.installed[entry.get('name')])
return False
entry.set('current_exists', 'false')