---
 show-changed-rco.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

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():
-- 
1.7.4.4

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to