[yum-commits] Branch 'yum-3_2_X' - cli.py yum/__init__.py
James Antill
james at osuosl.org
Sat May 23 03:06:22 UTC 2009
cli.py | 9 ++-------
yum/__init__.py | 1 -
2 files changed, 2 insertions(+), 8 deletions(-)
New commits:
commit 88c6d2d96fa69599c40f15f8a634468b24045bca
Author: James Antill <james at and.org>
Date: Fri May 22 23:06:15 2009 -0400
Use YumBase.setCacheDir() in cli, remove cache = 0 from setCacheDir()
diff --git a/cli.py b/cli.py
index 1b5224f..ef362d5 100644
--- a/cli.py
+++ b/cli.py
@@ -1153,13 +1153,8 @@ class YumOptionParser(OptionParser):
# user writable cachedir. If that fails fall back to cache-only.
if opts.cacheonly:
self.base.conf.cache = 1
- elif self.base.conf.uid != 0:
- cachedir = yum.misc.getCacheDir()
- if cachedir is None:
- self.base.conf.cache = 1
- else:
- self.base.conf.cachedir = cachedir
- self.base.repos.setCacheDir(cachedir)
+ elif not self.base.setCacheDir():
+ self.base.conf.cache = 1
if opts.obsoletes:
self.base.conf.obsoletes = 1
diff --git a/yum/__init__.py b/yum/__init__.py
index 06f8787..53f03f9 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3855,7 +3855,6 @@ class YumBase(depsolve.Depsolve):
return False # Tried, but failed, to get a "user" cachedir
self.repos.setCacheDir(cachedir + varReplace(suffix, self.yumvar))
- self.conf.cache = 0 # yum set cache=1, if uid != 0
return True # We got a new cache dir
More information about the Yum-commits
mailing list