[yum-commits] yumdownloader.py
James Antill
james at osuosl.org
Thu Jun 3 19:59:16 UTC 2010
yumdownloader.py | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
New commits:
commit 22a0669607366f7cc920ea9d54f966e57cf7001f
Author: James Antill <james at and.org>
Date: Thu Jun 3 15:58:33 2010 -0400
Have yumdownloader use yb.setCacheDir() so it goes the same location. BZ 599726
diff --git a/yumdownloader.py b/yumdownloader.py
index 688d211..e718430 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -86,18 +86,9 @@ class YumDownloader(YumUtilBase):
sys.exit(0)
# make yumdownloader work as non root user.
- if self.conf.uid != 0:
- cachedir = getCacheDir()
- self.logger.debug('Running as non-root, using %s as cachedir' % cachedir)
- if cachedir is None:
- self.logger.error("Error: Could not make cachedir, exiting")
- sys.exit(50)
- self.repos.setCacheDir(cachedir)
-
- # Turn off cache
- self.conf.cache = 0
- # make sure the repos know about it, too
- self.repos.setCache(0)
+ if not self.setCacheDir():
+ self.logger.error("Error: Could not make cachedir, exiting")
+ sys.exit(50)
# Setup yum (Ts, RPM db, Repo & Sack)
self.doUtilYumSetup(opts)
More information about the Yum-commits
mailing list