Bug#473259: python-debian: Please follow official release files for size in multivalued fields

Julian Andres Klode jak at jak-linux.org
Sat Mar 29 16:02:25 UTC 2008


Package: python-debian
Version: 0.1.9
Severity: low
Tags: patch

Currently, deb822 writes multivalued fields as 'checksum size filename', whereas
the official Release files use a specific width for the size:

The official release file:
 d8544bb5a8a8460c2f6c5576c073066a 22586597 main/binary-amd64/Packages
 ceda0c78baeec155fc6564737622d023       82 main/binary-amd64/Release

The same created by deb822:
 d8544bb5a8a8460c2f6c5576c073066a 22586597 main/binary-amd64/Packages
 ceda0c78baeec155fc6564737622d023 82 main/binary-amd64/Release

This makes the file a bit unreadable. To fix this, you just need to get the
len() of the str(size) of every file, take the longest one and write something
like "%8d" (if 8 is the longest size). This would produce more readable release
files.

One should also be able to specify int() values as size. Currently deb822 only
accepts strings, but a size is normally an integer value. The attached patch
also fixes that issue.

-- 
Julian Andres Klode, Fellow of the Free Software Foundation Europe
                     Debian Maintainer | Developer | Ubuntu Member

try Debian: http://www.debian.org/ | my site: http://jak-linux.org/
        jabber: juliank at jabber.org | IRC: juliank (FreeNode, OFTC)
            languages:     German  | English
-------------- next part --------------
A non-text attachment was scrubbed...
Name: size.diff
Type: text/x-diff
Size: 648 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20080329/bcf8e001/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-python-debian-maint/attachments/20080329/bcf8e001/attachment.pgp 


More information about the pkg-python-debian-maint mailing list