[yum-commits] yum/misc.py yum/yumRepo.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Mon Sep 24 13:22:45 UTC 2012
yum/misc.py | 8 +-------
yum/yumRepo.py | 2 +-
2 files changed, 2 insertions(+), 8 deletions(-)
New commits:
commit aa61ce9e7ebf8a8e8811d5b5ca70a804a26add1e
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Mon Sep 24 10:38:51 2012 +0200
YumRepo.dirSetup(): mkdir $cachedir/gen
diff --git a/yum/misc.py b/yum/misc.py
index 43f34f8..0fd3e90 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -1160,13 +1160,7 @@ def repo_gen_decompress(filename, generated_name, cached=False):
""" This is a wrapper around decompress, where we work out a cached
generated name, and use check_timestamps. filename _must_ be from
a repo. and generated_name is the type of the file. """
- dest = os.path.dirname(filename)
- dest += '/gen'
- if not os.path.exists(dest):
- if cached:
- return None
- os.makedirs(dest, mode=0755)
- dest += '/' + generated_name
+ dest = os.path.dirname(filename) + '/gen/' + generated_name
return decompress(filename, dest=dest, check_timestamps=True,fn_only=cached)
def read_in_items_from_dot_dir(thisglob, line_as_list=True):
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 4648da9..9b9cc72 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -660,7 +660,7 @@ class YumRepository(Repository, config.RepoConf):
cookie = self.cachedir + '/' + self.metadata_cookie_fn
self.setAttribute('_dir_setup_metadata_cookie', cookie)
- for dir in [self.cachedir, self.pkgdir]:
+ for dir in [self.cachedir, self.cachedir + '/gen', self.pkgdir]:
self._dirSetupMkdir_p(dir)
# persistdir is really root-only but try the make anyway and just
More information about the Yum-commits
mailing list