[yum-commits] yum/__init__.py

zpavlas at osuosl.org zpavlas at osuosl.org
Mon Sep 9 13:32:06 UTC 2013


 yum/__init__.py |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7c0aa6270f73533acfbf541a2e3cd12b55bd0bbe
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Mon Sep 9 15:24:50 2013 +0200

    More reliable po.localpath file:// URL test. BZ 1004089
    
    Use pkgdir instead of cachedir because it changes
    when downloading to user-specified directory.

diff --git a/yum/__init__.py b/yum/__init__.py
index f542fe6..d4673fa 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2265,10 +2265,10 @@ much more problems).
             cursize = os.stat(fo)[6]
             totsize = long(po.size)
             if cursize >= totsize and not po.repo.cache:
-                # if the path to the file is NOT inside the cachedir then don't
-                # unlink it b/c it is probably a file:// url and possibly
+                # if the path to the file is NOT inside the pkgdir then don't
+                # unlink it b/c it is probably a file:// url and possibly not
                 # unlinkable
-                if fo.startswith(po.repo.cachedir):
+                if fo.startswith(po.repo.pkgdir):
                     os.unlink(fo)
 
             if raiseError:


More information about the Yum-commits mailing list