Re: -s/--checksum deprecated
Axel Thimm <[email protected]>
| Newsgroups | gmane.linux.rpm.metadata |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Apr 17, 2009 at 04:22:46PM -0400, Seth Vidal wrote:
>
>
> On Fri, 17 Apr 2009, Axel Thimm wrote:
>
>> On Fri, Apr 17, 2009 at 03:31:44PM -0400, Seth Vidal wrote:
>>>>>> createrepo 0.9.7 has the options to change the checksum type
>>>>>> deprected, and indeed some parts are hardcoded (for example using -s
>>>>>> uses the proper sumtype for the meta-metadata, but still uses the
>>>>>> hardwired sha256 for the checksums of the packages themselves).
>>
>>>>> Check upstream git and latest 0.9.7 build in f11/rawhide - I already
>>>>> undeprecated it.
>>
>> I still have problems with the latest createrepo - I tried to use it
>> with "-s sha" and -s "sha1". The checksums of the metadata files in
>> repomd.xml is then indeed sha1, but the checksums of the packages in
>> primary is still sha256.
>
> you're right- I've just pushed a change which should fix this - and I'm
> fairly certain this doesn't break mergerepos.
>
> Check out from git and give it a test for me, please.
It works with '-s sha1', thanks! I checked it with RHEL5 clients,
e.g. yum-3.2.19-18.el5.
It bails out in yum/misc.py when using '-s sha' (which yum maps
internally onto sha1). Since other tools like smart/apt have this
hardcoded (the 'sha' vs 'sha1' choice is exported to the metadata) it
would be nice to fix this.
The following patch to yum/misc.py seems to do the job. But I don't
understand why it worked w/o it before sha256, so maybe I'm missing
something.
--- yum/misc.py~ 2009-04-16 12:02:13.000000000 +0200
+++ yum/misc.py 2009-04-18 10:32:29.000000000 +0200
@@ -207,6 +207,8 @@
if sumtype in _available_checksums:
sumalgo = hashlib.new(sumtype)
+ elif sumtype == 'sha' and 'sha1' in _available_checksums:
+ sumalgo = hashlib.new('sha1')
elif ignore_missing:
continue
else:
--
Axel.Thimm at ATrpms.net
_______________________________________________
Rpm-metadata mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/rpm-metadata
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknplbQACgkQQBVS1GOamfF7mgCgl62VSq/SWUQfYVR7Km5Aw6dH P8IAnA6VzkWNtMmfkYvDnnasqF1eFIrO =Sqf6 -----END PGP SIGNATURE-----