This is an automated email from the git hooks/post-receive script.
msuchy pushed a commit to branch master
in repository copr/copr.
commit fb2fe5645b766b89e50d9a84c7bb7d7cb92bdb12
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Nov 16 09:49:20 2017 +0100
optimize createrepo_c
This lower running time of createrepo_c to one half.
---
backend/backend/createrepo.py | 3 ++-
prunerepo/prunerepo | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/backend/backend/createrepo.py b/backend/backend/createrepo.py
index 73a4ac0..d5376b4 100644
--- a/backend/backend/createrepo.py
+++ b/backend/backend/createrepo.py
@@ -51,7 +51,8 @@ def createrepo_unsafe(path, dest_dir=None, base_url=None):
:return tuple: (return_code, stdout, stderr)
"""
- comm = ['/usr/bin/createrepo_c', '--database',
'--ignore-lock']
+ comm = ['/usr/bin/createrepo_c', '--database',
'--ignore-lock', '--local-sqlite',
+ '--cachedir', '/tmp/', '--workers', '8']
if os.path.exists(path + '/repodata/repomd.xml'):
comm.append("--update")
if "epel-5" in path or "rhel-5" in path:
diff --git a/prunerepo/prunerepo b/prunerepo/prunerepo
index 23a6905..55fb7c0 100755
--- a/prunerepo/prunerepo
+++ b/prunerepo/prunerepo
@@ -127,7 +127,8 @@ def recreate_repo():
Recreate the repository by using createrepo_c
"""
log_info("Recreating repository...")
- createrepo_cmd = ['/usr/bin/createrepo_c', '--database',
'--update'] + [ args.path ]
+ createrepo_cmd = ['/usr/bin/createrepo_c', '--database',
'--update', '--local-sqlite',
+ '--cachedir', '/tmp/', '--workers',
'8'] + [ args.path ]
return run_cmd(createrepo_cmd)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date