Re: yum 3.2.8 - checksum problem (it works fine on 3.0.5)

seth vidal <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <1204958959.2083.106.camel@cutter>
On Fri, 2008-03-07 at 22:35 -0800, Nicholas Adrian wrote:
> Hi,
> 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)
>                    break	
> 
>    print "checksum: %s " % (checksum,)
> 

Yah - so it looks like for sqlite sacks we're not ever making the
checksums list which is required. YumAvailablePackageSqlite just needs a
returnChecksums() method added. I'll get this fixed up but you could
simplify your code by using:

1. po.pkgId - that's the only checksum you really need
2. po.returnIdSum() - which returns the checksum type and the checksum
in a tuple

I'd suggest number 1 - that's most consistent

However, I will fix this.
-sv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.