[yum-commits] find-repos-of-install.py
James Antill
james at osuosl.org
Tue Jul 28 07:11:58 UTC 2009
find-repos-of-install.py | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
New commits:
commit 5bfec2ee52851e3f4644653657e3d2d1c1df95a1
Author: James Antill <james at and.org>
Date: Tue Jul 28 03:11:51 2009 -0400
Cleanup tempcache, and fix -C option
diff --git a/find-repos-of-install.py b/find-repos-of-install.py
index 5d71747..3c66277 100644
--- a/find-repos-of-install.py
+++ b/find-repos-of-install.py
@@ -48,19 +48,13 @@ if True:
(opts, args) = parser.parse_args()
- if os.geteuid() != 0 or opts.tempcache:
- cachedir = yum.misc.getCacheDir()
- if cachedir is None:
- my.logger.error("Error: Could not make cachedir, exiting")
- sys.exit(50)
- my.repos.setCacheDir(cachedir)
- my.conf.cache = 0 # yum set cache=1, if uid != 0
-
+ if not my.setCacheDir(opts.tempcache):
+ repoq.logger.error("Error: Could not make cachedir, exiting")
+ sys.exit(50)
if opts.cache:
my.conf.cache = True
- if not opts.quiet:
- my.logger.info('Running from cache, results might be incomplete.')
+ my.logger.info('Running from cache, results might be incomplete.')
if opts.repofrompath:
# setup the fake repos
More information about the Yum-commits
mailing list