---
yum/__init__.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/yum/__init__.py b/yum/__init__.py
index 198dc6d..d53db6d 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -6248,12 +6248,19 @@ much more problems).
:param suffix: suffix to attach to the directory name
:return: whether the new cache directory is successfully set
"""
- if not force and os.geteuid() == 0:
- return True # We are root, not forced, so happy with the global
dir.
if tmpdir is None:
tmpdir = os.getenv('TMPDIR')
if tmpdir is None: # Note that TMPDIR isn't exported by default :(
tmpdir = '/var/tmp'
+ if not force and os.geteuid() == 0:
+ # find user cachedirs
+ dirs = []
+ for cachedir in sorted(glob.glob(tmpdir + '/yum-*-*')):
+ cachedir += varReplace(suffix, self.conf.yumvar)
+ if os.path.exists(cachedir):
+ dirs.append(cachedir)
+ self._preload_from_user = dirs
+ return True # We are root, not forced, so happy with the global
dir.
try:
cachedir = misc.getCacheDir(tmpdir, reuse)
except (IOError, OSError), e:
--
1.7.4.4
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel