summaryrefslogtreecommitdiffstats
path: root/src/py-libs
diff options
context:
space:
mode:
authorMichael E Brown <mebrown@michaels-house.net>2007-11-17 18:58:53 -0600
committerMichael E Brown <mebrown@michaels-house.net>2007-11-17 18:58:53 -0600
commit41be2f7ec5b41e978e833f87883b92e37d42e136 (patch)
treec15f72816beabdaecc6a64e7c505248fd6c02475 /src/py-libs
parent36ef1aca01a4acdf146f54092bbf869e95972761 (diff)
downloadmock-41be2f7ec5b41e978e833f87883b92e37d42e136.tar.gz
mock-41be2f7ec5b41e978e833f87883b92e37d42e136.tar.xz
mock-41be2f7ec5b41e978e833f87883b92e37d42e136.zip
make setarch configurable because suse doesnt have it.
Diffstat (limited to 'src/py-libs')
-rw-r--r--src/py-libs/backend.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/py-libs/backend.py b/src/py-libs/backend.py
index 971b030..492e8a0 100644
--- a/src/py-libs/backend.py
+++ b/src/py-libs/backend.py
@@ -32,7 +32,11 @@ class Root(object):
self.uidManager = uidManager
self._hooks = {}
self.chrootWasCleaned = False
- self.preExistingDeps = "/usr/bin/setarch "
+
+ self.preExistingDeps = ""
+ self.setarch = config['setarch']
+ if config['internal_setarch']:
+ self.preExistingDeps = "/usr/bin/setarch "
self.sharedRootName = config['root']
root = self.sharedRootName
@@ -372,7 +376,7 @@ class Root(object):
self._callHooks('prebuild')
mock.util.do(
- "setarch %s rpmbuild -bb --target %s --nodeps %s" % (self.target_arch, self.target_arch, chrootspec),
+ "%s rpmbuild -bb --target %s --nodeps %s" % (self.setarch, self.target_arch, chrootspec),
chrootPath=self.rootdir,
uidManager=self.uidManager,
uid=self.chrootuid,
@@ -440,7 +444,7 @@ class Root(object):
def _yum(self, cmd, returnOutput=0):
"""use yum to install packages/package groups into the chroot"""
# mock-helper yum --installroot=rootdir cmd
- cmd = 'setarch %s %s --installroot %s %s' % (self.target_arch, self.yum_path, self.rootdir, cmd)
+ cmd = '%s %s --installroot %s %s' % (self.setarch, self.yum_path, self.rootdir, cmd)
self.root_log.info(cmd)
try:
self._callHooks("preyum")