[Yum-devel] [PATCH] Revert "Add a final check for package downloads. BZ 681224"

Zdeněk Pavlas zpavlas at redhat.com
Wed Nov 7 09:42:32 UTC 2012


This always fails when async==True: can't verify package before it's
actually downloaded.  Seems redundant, as we already run the same
checkfunc in checkfunc=None case.

Since downloadPkgs() catches RepoError exceptions and clears it after
successful DL, this mostly didn't show up.  But when DL fails a bogus
error message was printed.

Conflicts:

	yum/yumRepo.py
---
 yum/yumRepo.py |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 414f1d9..4601ef6 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -983,7 +983,7 @@ Insufficient space in download directory %s
                     misc.unlink_f(local)
                     raise URLGrabError(-1, _('Package does not match intended download.'))
 
-        ret = self._getFile(url=basepath,
+        return self._getFile(url=basepath,
                         relative=remote,
                         local=local,
                         checkfunc=checkfunc,
@@ -993,13 +993,6 @@ Insufficient space in download directory %s
                         **kwargs
                         )
 
-        if not package.verifyLocalPkg(): # Don't return as "success" when bad.
-            msg = "Downloaded package %s, from %s, but it was invalid."
-            msg = msg % (package, package.repo.id)
-            raise Errors.RepoError, msg
-
-        return ret
-
     def getHeader(self, package, checkfunc = None, reget = 'simple',
             cache = True):
 
-- 
1.7.4.4



More information about the Yum-devel mailing list