[yum-commits] 2 commits - yum/misc.py yum/yumRepo.py

zpavlas at osuosl.org zpavlas at osuosl.org
Fri Sep 7 07:04:34 UTC 2012


 yum/misc.py    |    2 ++
 yum/yumRepo.py |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7bd23b46e6809fa9d35f51a3bf6ed9a7f02bb8bf
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Thu Sep 6 16:07:50 2012 +0200

    getGroups(): repo_gen_decompress should know when cached

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 876dc12..7d5d34e 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1778,7 +1778,7 @@ Insufficient space in download directory %s
             fn = self._retrieveMD('group_gz', retrieve_can_fail=True)
             if fn:
                 try:
-                    fn = misc.repo_gen_decompress(fn, 'comps.xml')
+                    fn = misc.repo_gen_decompress(fn, 'comps.xml', cached=self.cache)
                 except IOError, e:
                     logger.warning(e)
                     fn = None
commit 213a5273ad762757bba994fb32f8fecded61ac6f
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Thu Sep 6 16:00:12 2012 +0200

    repo_gen_decompress(cached=True): No /gen dir => no file.  BZ 854974

diff --git a/yum/misc.py b/yum/misc.py
index a39a222..43f34f8 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -1163,6 +1163,8 @@ def repo_gen_decompress(filename, generated_name, cached=False):
     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
     return decompress(filename, dest=dest, check_timestamps=True,fn_only=cached)


More information about the Yum-commits mailing list