summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-03-11 14:42:42 -0800
committerJesse Keating <jkeating@redhat.com>2010-03-11 14:42:42 -0800
commitb20ae0ba052618a6a8f58ea800f6e008f8d015b8 (patch)
treee7e8c94c63cce61ea0a8f660b54161664e2963ff
parentd490c8eba24b5be4785316fca5f2c9c724e990f7 (diff)
downloadmock-b20ae0ba052618a6a8f58ea800f6e008f8d015b8.tar.gz
mock-b20ae0ba052618a6a8f58ea800f6e008f8d015b8.tar.xz
mock-b20ae0ba052618a6a8f58ea800f6e008f8d015b8.zip
make createrepo command an option (skvidal)
-rw-r--r--etc/mock/site-defaults.cfg1
-rwxr-xr-xpy/mock.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/etc/mock/site-defaults.cfg b/etc/mock/site-defaults.cfg
index 6da9290..8e9911c 100644
--- a/etc/mock/site-defaults.cfg
+++ b/etc/mock/site-defaults.cfg
@@ -48,6 +48,7 @@
# if you want mock to automatically run createrepo on the rpms in your
# resultdir.
# config_opts['createrepo_on_rpms'] = True
+# config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm'
#############################################################################
#
diff --git a/py/mock.py b/py/mock.py
index eea493c..7468f43 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -228,6 +228,7 @@ def setup_default_config_opts(config_opts, unprivUid):
config_opts['cleanup_on_failure'] = 1
config_opts['createrepo_on_rpms'] = True
+ config_opts['createrepo_command'] = '/usr/bin/createrepo -d -q -x *.src.rpm' # default command
# (global) plugins and plugin configs.
# ordering constraings: tmpfs must be first.
# root_cache next.
@@ -382,7 +383,8 @@ def do_rebuild(config_opts, chroot, srpms):
if config_opts["createrepo_on_rpms"]:
log.info("Running createrepo on binary rpms in resultdir")
- cmd = ['/usr/bin/createrepo', '-d', '-q', '-x', '*.src.rpm', chroot.resultdir]
+ cmd = config_opts["createrepo_command"].split()
+ cmd.append(chroot.resultdir)
mock.util.do(cmd)
except (Exception, KeyboardInterrupt):