diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2012-03-29 08:26:53 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-05-24 09:58:18 -0400 |
commit | 9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f (patch) | |
tree | bebabc2cbc1d259a63dacb5a43729d826ad5c179 | |
parent | 4c4534c2302c869f5f8258eb7107dcf531e0edc7 (diff) | |
download | bcfg2-9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f.tar.gz bcfg2-9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f.tar.bz2 bcfg2-9d9dd8f7f83fa6aa43faf9f2bda15a24aa0eab5f.zip |
backported option to make Packages plugin set version="any"
-rw-r--r-- | src/lib/Server/Plugins/Packages/__init__.py | 9 |
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 |