|
|
085af2 |
diff -up yum-utils-1.1.31/repotrack.py.orig yum-utils-1.1.31/repotrack.py
|
|
|
085af2 |
--- yum-utils-1.1.31/repotrack.py.orig 2019-09-10 19:51:11.702158451 +0200
|
|
|
085af2 |
+++ yum-utils-1.1.31/repotrack.py 2019-09-10 19:51:48.542659295 +0200
|
|
|
085af2 |
@@ -145,6 +145,27 @@ def main():
|
|
|
085af2 |
archlist.extend(rpmUtils.arch.getArchList(opts.arch))
|
|
|
085af2 |
else:
|
|
|
085af2 |
archlist = rpmUtils.arch.getArchList()
|
|
|
085af2 |
+
|
|
|
085af2 |
+ if opts.repofrompath:
|
|
|
085af2 |
+ for repo in opts.repofrompath:
|
|
|
085af2 |
+ tmp = tuple(repo.split(','))
|
|
|
085af2 |
+ if len(tmp) != 2:
|
|
|
085af2 |
+ my.logger.error("Error: Bad repofrompath argument: %s" %repo)
|
|
|
085af2 |
+ continue
|
|
|
085af2 |
+ repoid, repopath = tmp
|
|
|
085af2 |
+ if repopath and repopath[0] == '/':
|
|
|
085af2 |
+ baseurl = 'file://' + repopath
|
|
|
085af2 |
+ else:
|
|
|
085af2 |
+ baseurl = repopath
|
|
|
085af2 |
+ try:
|
|
|
085af2 |
+ my.add_enable_repo(repoid, baseurls=[baseurl],
|
|
|
085af2 |
+ basecachedir=my.conf.cachedir,
|
|
|
085af2 |
+ timestamp_check=False)
|
|
|
085af2 |
+ except yum.Errors.DuplicateRepoError, e:
|
|
|
085af2 |
+ my.logger.error(e)
|
|
|
085af2 |
+ sys.exit(1)
|
|
|
085af2 |
+ if not opts.quiet:
|
|
|
085af2 |
+ my.logger.info("Added %s repo from %s" % (repoid, repopath))
|
|
|
085af2 |
|
|
|
085af2 |
# do the happy tmpdir thing if we're not root
|
|
|
085af2 |
if os.geteuid() != 0 or opts.tempcache:
|
|
|
085af2 |
@@ -175,27 +196,6 @@ def main():
|
|
|
085af2 |
my.logger.error(e)
|
|
|
085af2 |
sys.exit(1)
|
|
|
085af2 |
|
|
|
085af2 |
- if opts.repofrompath:
|
|
|
085af2 |
- for repo in opts.repofrompath:
|
|
|
085af2 |
- tmp = tuple(repo.split(','))
|
|
|
085af2 |
- if len(tmp) != 2:
|
|
|
085af2 |
- my.logger.error("Error: Bad repofrompath argument: %s" %repo)
|
|
|
085af2 |
- continue
|
|
|
085af2 |
- repoid, repopath = tmp
|
|
|
085af2 |
- if repopath and repopath[0] == '/':
|
|
|
085af2 |
- baseurl = 'file://' + repopath
|
|
|
085af2 |
- else:
|
|
|
085af2 |
- baseurl = repopath
|
|
|
085af2 |
- try:
|
|
|
085af2 |
- my.add_enable_repo(repoid, baseurls=[baseurl],
|
|
|
085af2 |
- basecachedir=my.conf.cachedir,
|
|
|
085af2 |
- timestamp_check=False)
|
|
|
085af2 |
- except yum.Errors.DuplicateRepoError, e:
|
|
|
085af2 |
- my.logger.error(e)
|
|
|
085af2 |
- sys.exit(1)
|
|
|
085af2 |
- if not opts.quiet:
|
|
|
085af2 |
- my.logger.info("Added %s repo from %s" % (repoid, repopath))
|
|
|
085af2 |
-
|
|
|
085af2 |
try:
|
|
|
085af2 |
my.doRepoSetup()
|
|
|
085af2 |
my._getSacks(archlist=archlist)
|