Do something, when the verification fails.
(unlink file, try next mirror)
---
 yum/yumRepo.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index b057961..4648da9 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -976,7 +976,10 @@ Insufficient space in download directory %s
             misc.unlink_f(local)
 
         if checkfunc is None:
-            checkfunc = lambda obj: package.verifyLocalPkg()
+            def checkfunc(obj):
+                if not package.verifyLocalPkg():
+                    misc.unlink_f(local)
+                    raise URLGrabError(-1, _('Package does not match intended 
download.'))
 
         ret = self._getFile(url=basepath,
                         relative=remote,
-- 
1.7.4.4

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to