[rhel6/master] verify package checksums against metadata (#681224)
Brian C. Lane
bcl at redhat.com
Tue Aug 14 21:15:53 UTC 2012
From: "Brian C. Lane" <bcl at redhat.com>
Anaconda uses yum's getPackage() function to grab packages. It needs to
have a function passed to it in order to verify the package checksum
against the metadata.
Resolves: rhbz#681224
---
yuminstall.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/yuminstall.py b/yuminstall.py
index 61a0b65..57f826a 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -177,7 +177,8 @@ class AnacondaCallback:
while self.openfile is None:
trynumber += 1
try:
- fn = repo.getPackage(po)
+ checkfunc = (self.ayum.verifyPkg, (po, 1), {})
+ fn = repo.getPackage(po, checkfunc=checkfunc)
f = open(fn, 'r')
self.openfile = f
@@ -185,6 +186,9 @@ class AnacondaCallback:
self.ayum._handleFailure(po, trynumber)
except IOError:
self.ayum._handleFailure(po, trynumber)
+ except URLGrabError as e:
+ log.error("URLGrabError: %s" % (e,))
+ self.ayum._handleFailure(po, trynumber)
except yum.Errors.RepoError, e:
continue
self.inProgressPo = po
--
1.7.11.2
More information about the anaconda-patches
mailing list