#686638 Handle whitespaces-comma-whitespaces sequence in Uploaders field

Package:
python-debian
Source:
python-debian
Submitter:
Jakub Wilk
Date:
2015-05-18 00:09:08 UTC
Severity:
normal
Blocked By:
Bug Title
401452

  17

Standardize syntax of the name in the Maintainer control field

wishlist stable testing unstable 7 months ago

509935

  34

decide whether Uploaders is parsed per RFC 5322

wishlist stable testing unstable over 5 years ago

#686638#3
Date:
2011-11-18 23:28:00 UTC
From:
To:
Some Uploaders fields were not split correctly:
$ zgrep ' , ' /srv/ftp-master.debian.org/ftp/indices/Uploaders.gz
fonts-oldstandard    Nicolas Spalinger <nicolas.spalinger@sil.org> , Christian Perrier <bubulle@debian.org>
osm2pgsql            Andreas Putzo <andreas@putzo.net> , Francesco Paolo Lovergine <frankie@debian.org> , David Paleino <dapal@debian.org> , Debian OpenStreetMap Team <pkg-osm-maint@lists.alioth.debian.org>
python-liblas        Francesco Paolo Lovergine <frankie@debian.org> , David Paleino <dapal@debian.org>
python-xml           Alexandre Fayolle <afayolle@debian.org> , Fabio Tranchitella <kobold@debian.org>
python-xml-dbg       Alexandre Fayolle <afayolle@debian.org> , Fabio Tranchitella <kobold@debian.org>
python-xml-doc       Alexandre Fayolle <afayolle@debian.org> , Fabio Tranchitella <kobold@debian.org>
ttf-oldstandard      Nicolas Spalinger <nicolas.spalinger@sil.org> , Christian Perrier <bubulle@debian.org>
xbel                 Alexandre Fayolle <afayolle@debian.org> , Fabio Tranchitella <kobold@debian.org>
xbel-utils           Alexandre Fayolle <afayolle@debian.org> , Fabio Tranchitella <kobold@debian.org>

You might want to use this regular expression:
'(?<=>)\s*,\s*'

#686638#10
Date:
2012-09-04 07:36:36 UTC
From:
To:
clone 649220 -1
reassign -1 python-debian
retitle -1 Handle whitespaces-comma-whitespaces sequence in Uploaders field
block 649220 by -1
thanks


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 <foo@debian.org> , Bar <bar@debian.org>
$ python
Foo <foo@debian.org> , Bar <bar@debian.org>

Other fields are parsed correctly:
root@debomatic64:/haha# cat */debian/control | grep Build-Depends:
Build-Depends: debhelper , quilt
$ python
debhelper, quilt

As you can see in the first example, fields are still separated by the
sequence of "space-comma-space"; in the second example, fields are
separated by the correct sequence of "comma-space".

#686638#23
Date:
2014-08-02 14:24:04 UTC
From:
To:
Control: tags -1 + moreinfo

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.

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

#686638#28
Date:
2014-08-02 16:01:58 UTC
From:
To:
* Stuart Prescott <stuart@debian.org>, 2014-08-03, 00:24:

See bug #509935. (I should have mentioned it when filing this bug. Sorry
about that.)