Control: tags -1 + moreinfo
> python-debian does not parse Uploaders field correctly when separated
> by commas and multiple spaces in control file
> $ cat */debian/control | grep Uploaders
> Uploaders: Foo <[email protected]> , Bar <[email protected]>
> $ python
> >>> from debian.debfile import Deb822
> >>> fields = Deb822(open('test_0.1.dsc', 'r'))
> >>> print fields['Uploaders']
> Foo <[email protected]> , Bar <[email protected]>
I don't believe that python-debian actually attempts to parse Uploaders at
all, let alone doing so incorrectly. Like most other fields, the data in
Uploaders is just added to the dict entry and python-debian is neither parsing
nor normalising this data.
> Other fields are parsed correctly:
> root@debomatic64:/haha# cat */debian/control | grep Build-Depends:
> Build-Depends: debhelper , quilt
> $ python
> >>> from debian.debfile import Deb822
> >>> fields = Deb822(open('test_0.1.dsc', 'r'))
> >>> print fields['Build-Depends']
> debhelper, quilt
In contrast to most other fields, Build-Depends *is* actually parsed, data
structures are created and the print statement is then flattening that data
structure back into a string. That has the effect of normalising the data as
well.
Normalisation of Uploaders implies loading the list of uploaders into some
sort of data structure. Any suggestions on what data structure should be used
(bearing in mind that changing from a string to a list would be API breaking
and there are users of this API both inside and outside the archive)?
Moreover, I'm not sure whether Policy §5.6.3 and §5.6.2 is actually saying
that you could naively split on "\s*,\s*" in any case -- is the maintainer's
name allowed to contain commas and be quoted in an rfc822-compliant way?
cheers
Stuart
--
Stuart Prescott http://www.nanonanonano.net/ [email protected]
Debian Developer http://www.debian.org/ [email protected]
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
--
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-python-debian-maint