[PATCH] checkMD: re-check when xattr matches but size==0. BZ 1002494

Zdenek Pavlas zpavlas at redhat.com
Thu Aug 29 11:34:28 UTC 2013


---
 yum/yumRepo.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 970b628..2182ddf 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1757,7 +1757,9 @@ Insufficient space in download directory %s
             fsize = misc.stat_f(file)
             if fsize is not None: # We just got an xattr, so it should be there
                 if size is None and l_csum == r_csum:
-                    return 1
+                    if fsize.st_size > 0:
+                        return 1
+                    logger.warning('%s: empty file with correct checksum!', file)
                 if size == fsize.st_size and l_csum == r_csum:
                     return 1
             # Anything goes wrong, run the checksums as normal...
-- 
1.7.11.7



More information about the Yum-devel mailing list