[Yum] yum 3.2.8 - checksum problem (it works fine on 3.0.5)

Nicholas Adrian nicholas_adrian at yahoo.com
Sat Mar 8 06:35:41 UTC 2008

I have a checksum problem after upgraded to yum 3.2.8 (from 3.0.5).

I have the following code  in the predownload hook.

- - - - -
def predownload_hook(conduit):
   pkglist = conduit.getDownloadPackages()
   for po in pkglist:
        for (csumtype, csum, csumid) in po.checksums:
             if csumid:
                   checksum = "%s:%s" % (csumtype, csum)

   print "checksum: %s " % (checksum,)

Note: that code is part of a bigger program. Just want to simplify the

Every time I run yum (install), I got the following message:

UnboundLocalError: local variable 'checksum' referenced before assignment

po.checksums is always empty. I tried it in several packages.

That code is working fine on yum 3.0.5 for the same set of packages (repos).
I always clean up the cache (yum clean all) before run the yum command.

Thx in advance for any pointer.

View this message in context: http://www.nabble.com/yum-3.2.8---checksum-problem-%28it-works-fine-on-3.0.5%29-tp15911757p15911757.html
Sent from the YUM - Users mailing list archive at Nabble.com.

More information about the Yum mailing list