[yum-commits] 2 commits - show-changed-rco.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Wed Mar 21 13:55:25 UTC 2012
show-changed-rco.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit d94d881a06c2a3fb001a0cde60b8e2909fd8ed10
Merge: d3e8a07 7db8781
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Wed Mar 21 14:55:17 2012 +0100
Merge branch 'master' of ssh://rpm.org/srv/git/yum.baseurl.org/yum-utils
commit d3e8a07e2080795af67b0abb8a7277d337557950
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Tue Mar 20 18:18:09 2012 +0100
Implement --repofrompath option in show-changed-rco.py
(was already documented but not implemented)
diff --git a/show-changed-rco.py b/show-changed-rco.py
index fca53cc..f314ef0 100755
--- a/show-changed-rco.py
+++ b/show-changed-rco.py
@@ -194,6 +194,21 @@ def main():
if opts.conffile is not None:
yb.preconf.fn = opts.conffile
+ # setup the fake repos
+ for repo in opts.repofrompath or []:
+ tmp = tuple(repo.split(','))
+ if len(tmp) != 2:
+ yb.logger.error("Error: Bad repofrompath argument: %s" %repo)
+ continue
+ repoid,repopath = tmp
+ if repopath[0] == '/':
+ baseurl = 'file://' + repopath
+ else:
+ baseurl = repopath
+ yb.add_enable_repo(repoid, baseurls=[baseurl],
+ basecachedir=yb.conf.cachedir)
+ yb.logger.info("Added %s repo from %s" % (repoid, repopath))
+
if opts.cache:
yb.conf.cache = 1
elif not yb.setCacheDir():
More information about the Yum-commits
mailing list