summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Yum.py10
-rwxr-xr-xsrc/sbin/bcfg2-yum-helper3
2 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
index b5fbfd8fe..8d398e038 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
@@ -363,11 +363,11 @@ class YumCollection(Collection):
def get_provides(self, required, all=False, silent=False):
if not self.use_yum:
- return Collection.get_provides(self, package)
+ return Collection.get_provides(self, required)
else:
# this should really never get called; it's just provided
# for API completeness
- return self.call_helper("get_provides", package)
+ return self.call_helper("get_provides", required)
def get_groups(self, grouplist):
if not self.use_yum:
@@ -404,8 +404,10 @@ class YumCollection(Collection):
name = entry.get("name")
def _tag_to_pkg(tag):
- rv = (name, tag.get("arch"), tag.get("epoch"),
- tag.get("version"), tag.get("release"))
+ rv = [name, tag.get("arch"), tag.get("epoch"),
+ tag.get("version"), tag.get("release")]
+ if rv[3] in ['any', 'auto']:
+ rv = (rv[0], rv[1], rv[2], None, None)
# if a package requires no specific version, we just use
# the name, not the tuple. this limits the amount of JSON
# encoding/decoding that has to be done to pass the
diff --git a/src/sbin/bcfg2-yum-helper b/src/sbin/bcfg2-yum-helper
index a0698cc90..3649b9794 100755
--- a/src/sbin/bcfg2-yum-helper
+++ b/src/sbin/bcfg2-yum-helper
@@ -46,6 +46,9 @@ def pkg_to_tuple(package):
return package
def pkgtup_to_string(package):
+ if package[3] in ['auto', 'any']:
+ return package[0]
+
rv = [package[0], "-"]
if package[2]:
rv.extend([package[2], ':'])