summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2012-03-29 08:26:53 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-24 09:58:18 -0400
commit9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f (patch)
treebebabc2cbc1d259a63dacb5a43729d826ad5c179 /src
parent4c4534c2302c869f5f8258eb7107dcf531e0edc7 (diff)
downloadbcfg2-9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f.tar.gz
bcfg2-9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f.tar.bz2
bcfg2-9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f.zip
backported option to make Packages plugin set version="any"
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Packages/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Packages/__init__.py b/src/lib/Server/Plugins/Packages/__init__.py
index b04c299a6..17a3458bd 100644
--- a/src/lib/Server/Plugins/Packages/__init__.py
+++ b/src/lib/Server/Plugins/Packages/__init__.py
@@ -91,7 +91,9 @@ class Packages(Bcfg2.Server.Plugin.Plugin,
def HandleEntry(self, entry, metadata):
if entry.tag == 'Package':
collection = self._get_collection(metadata)
- entry.set('version', 'auto')
+ entry.set('version', self.config.get("global",
+ "version",
+ default="auto"))
entry.set('type', collection.ptype)
elif entry.tag == 'Path':
if (entry.get("name") == self.config.get("global", "yum_config",
@@ -182,8 +184,9 @@ class Packages(Bcfg2.Server.Plugin.Plugin,
newpkgs.sort()
for pkg in newpkgs:
lxml.etree.SubElement(independent, 'BoundPackage', name=pkg,
- version='auto', type=collection.ptype,
- origin='Packages')
+ version=self.config.get("global", "version",
+ default="auto"),
+ type=collection.ptype, origin='Packages')
def Refresh(self):
'''Packages.Refresh() => True|False\nReload configuration