summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2014-04-21 12:52:40 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2014-04-21 12:52:40 -0400
commitafc80cef3a253656723958f5736153025d4535c1 (patch)
treeb6991acdcdf20b381d553fcada77c914fcbbf895 /src/sbin
parentd2ca484d6bd07c3d7b36a9da8b59f4c1c523445d (diff)
parent2454dddb3a5a0afdcfc2f875edfdcc7b5a85d4ba (diff)
downloadbcfg2-afc80cef3a253656723958f5736153025d4535c1.tar.gz
bcfg2-afc80cef3a253656723958f5736153025d4535c1.tar.bz2
bcfg2-afc80cef3a253656723958f5736153025d4535c1.zip
Merge pull request #164 from zultron/maint
Enable bcfg2-yum-helper to depsolve for arches incompatible with server
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-yum-helper9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sbin/bcfg2-yum-helper b/src/sbin/bcfg2-yum-helper
index 227d977de..dc6a6cc0b 100755
--- a/src/sbin/bcfg2-yum-helper
+++ b/src/sbin/bcfg2-yum-helper
@@ -62,6 +62,10 @@ class YumHelper(object):
# pylint: enable=E1121,W0212
self.logger = logging.getLogger(self.__class__.__name__)
+ def setarch(self, arch):
+ """ Configure an arch other than the bcfg2 server arch for dep
+ resolution. """
+ self.yumbase.arch.setup_arch(arch=arch)
class DepSolver(YumHelper):
""" Yum dependency solver. This is used for operations that only
@@ -326,6 +330,11 @@ def main():
sys.exc_info()[1])
rv = 2
try:
+ # if provided, set client arch for dependency resolution
+ arch = data.get('arch', None)
+ if arch is not None:
+ depsolver.setarch(arch)
+
depsolver.groups = data['groups']
(packages, unknown) = depsolver.complete(
[pkg_to_tuple(p) for p in data['packages']])