summaryrefslogtreecommitdiffstats
path: root/py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-03-11 14:19:58 -0800
committerJesse Keating <jkeating@redhat.com>2010-03-11 14:19:58 -0800
commitd490c8eba24b5be4785316fca5f2c9c724e990f7 (patch)
treea16c29a38e92d5aa55eb93729d7b9950dd0a4a45 /py
parentbc678aba383d1a6ad4ffd884ca21aa4058856e86 (diff)
downloadmock-d490c8eba24b5be4785316fca5f2c9c724e990f7.tar.gz
mock-d490c8eba24b5be4785316fca5f2c9c724e990f7.tar.xz
mock-d490c8eba24b5be4785316fca5f2c9c724e990f7.zip
Revert "Revert "add configuration option to run createrepo on result rpms""
This reverts commit bc678aba383d1a6ad4ffd884ca21aa4058856e86. Revert the revert, wheee! This is appropriate for 1.1 moving forward.
Diffstat (limited to 'py')
-rwxr-xr-xpy/mock.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/py/mock.py b/py/mock.py
index f4794ac..eea493c 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -227,6 +227,7 @@ def setup_default_config_opts(config_opts, unprivUid):
config_opts['cleanup_on_success'] = 1
config_opts['cleanup_on_failure'] = 1
+ config_opts['createrepo_on_rpms'] = True
# (global) plugins and plugin configs.
# ordering constraings: tmpfs must be first.
# root_cache next.
@@ -378,6 +379,12 @@ def do_rebuild(config_opts, chroot, srpms):
if config_opts["cleanup_on_success"]:
log.info("Cleaning up build root ('clean_on_success=True')")
chroot.clean()
+
+ 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]
+ mock.util.do(cmd)
+
except (Exception, KeyboardInterrupt):
elapsed = time.time() - start
log.error("Exception(%s) Config(%s) %d minutes %d seconds"