[yum-commits] 3 commits - plugins/tmprepo repoquery.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Wed Jul 31 13:41:16 UTC 2013
plugins/tmprepo/tmprepo.py | 2 +-
repoquery.py | 18 +++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
New commits:
commit 0404bf8b5f565a49a5b30d7b75643c137153fdf0
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Thu Jul 25 10:42:53 2013 +0200
repoquery: retry doLock() BZ 988223
diff --git a/repoquery.py b/repoquery.py
index ae94246..e68c44c 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -1502,11 +1502,11 @@ def main(args):
for repo in repoq.repos.findRepos(repo_match):
repo.enable()
- try:
- repoq.doLock()
- except yum.Errors.LockError, e:
+ while True:
+ try: repoq.doLock(); break
+ except yum.Errors.LockError, e: pass
repoq.logger.error(e)
- sys.exit(50)
+ time.sleep(2)
try:
if not hasattr(repoq, 'arch'):
commit e166248637a16a7e110ff3ebb2370b05795dfbdd
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Thu Jul 25 09:23:39 2013 +0200
sanitize repoquery --repofrompath. BZ 988140
diff --git a/repoquery.py b/repoquery.py
index 403074b..ae94246 100755
--- a/repoquery.py
+++ b/repoquery.py
@@ -1437,9 +1437,13 @@ def main(args):
else:
baseurl = repopath
- repoq.add_enable_repo(repoid, baseurls=[baseurl],
- basecachedir=repoq.conf.cachedir,
- timestamp_check=False)
+ try:
+ repoq.add_enable_repo(repoid, baseurls=[baseurl],
+ basecachedir=repoq.conf.cachedir,
+ timestamp_check=False)
+ except yum.Errors.DuplicateRepoError, e:
+ repoq.logger.error(e)
+ sys.exit(1)
if not opts.quiet:
repoq.logger.info( "Added %s repo from %s" % (repoid,repopath))
commit 6bec80e1f40d00b87939b116dd6907514f420fc2
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Wed Jul 31 15:36:54 2013 +0200
tmprepo: avoid spaces in repoid. BZ 965806
We should avoid spaces in generated repoid also for file://path-to-repo/
arguments. Amends commit f70833f.
diff --git a/plugins/tmprepo/tmprepo.py b/plugins/tmprepo/tmprepo.py
index 93e560a..ec51f5b 100644
--- a/plugins/tmprepo/tmprepo.py
+++ b/plugins/tmprepo/tmprepo.py
@@ -91,7 +91,7 @@ def add_dir_repo(base, trepo, cleanup):
os.chmod(trepo_data, 0755)
trepo_name = os.path.basename(os.path.dirname(trepo_path))
tmp_fname = "%s/tmp-%s.repo" % (trepo_data, trepo_name)
- repoid = "T-%4.4s-%x" % (trepo_name, int(time.time()))
+ repoid = "T-%0.4s-%x" % (trepo_name, int(time.time()))
tpc = 'true'
if not lpgpgcheck:
tpc = 'false'
More information about the Yum-commits
mailing list