Restore setting cachedir when non-root but don't take a useless cachedir parameter to the function
* Revert "Remove unused code"
This reverts commit bcfba0c050
.
* Re-add the changes to remove cachedir as a parameter
This commit is contained in:
parent
de5d501741
commit
86c30e68a1
1 changed files with 8 additions and 0 deletions
|
@ -171,6 +171,14 @@ def yum_base(conf_file=None):
|
|||
my.preconf.errorlevel=0
|
||||
if conf_file and os.path.exists(conf_file):
|
||||
my.preconf.fn = conf_file
|
||||
if os.geteuid() != 0:
|
||||
if hasattr(my, 'setCacheDir'):
|
||||
my.setCacheDir()
|
||||
else:
|
||||
cachedir = yum.misc.getCacheDir()
|
||||
my.repos.setCacheDir(cachedir)
|
||||
my.conf.cache = 0
|
||||
|
||||
return my
|
||||
|
||||
def install_yum_utils(module):
|
||||
|
|
Loading…
Reference in a new issue