On Tue, 2009-06-02 at 17:12 +0100, Neil Williams wrote:
> The actual changes file at test is the one already in the PTS:
> http://packages.qa.debian.org/a/aptitude/news/20081120T050204Z.html
>
> Copy and paste that text into a test.changes file (removing the final
> Accepted comments) and dcmd fails:
[...]
> 43833c63366bab3d906c7287487c7b7c 32626 admin - aptitude_0.4.11.11-1.diff.gz
>
> I don't think dcmd is expecting that hyphen. It's probably related to the lack
> of a Priority: in the Source stanza of debian/control for aptitude, so
> the hyphen represents optional, extra etc.
>
> Now that is a bug in aptitude itself
"Maybe". See below.
> but as the archive has accepted this .changes file, dcmd should at least be
> able to handle it.
Indeed; fixed in SVN, thanks.
> Editing the sample content and replacing the hyphens with 'optional' prevents
> the bug showing up but dcmd should print a warning that the Priority of the
> Source package has been guessed and continue to process the .changes file.
I'm not sure it's dcmd's place to be warning about the content of
fields, to be honest. So long as the content is parseable, the only
part of the line the script is interested in is the final field; the
regular expression which currently fails only really exists to avoid
pulling out lines that happen to end in a filename.
> I'll seek a lintian check on this too, however, I can't see where in Policy
> it is stated that the Source stanza has to have either Section or Priority.
> lintian does not currently complain about a missing 'Priority' in the
> Source stanza.
Policy 5.2, "Source package control files -- `debian/control'":
The fields in the general paragraph (the first one, for the source
package) are:
[...]
* `Section' (recommended)
* `Priority' (recommended)
Lintian does have no-section, no-section-for-source and no-priority
tags; only the middle of those three is currently matching any packages
in the archives according to lintian.d.o. As the description of that
tag makes clear, ftp-master have specified that source packages must
have a Section field in order to be installed in the Debian archive.
However, as the absence of the field is permitted by policy, I've made
dcmd parse such files, as other archives (including private use) may not
have such a restriction.
fwiw, Policy 5.6.21 includes the following as part of the discussion of
the "Files" stanza:
In the `.changes' file this contains one line per file being uploaded.
Each line contains the MD5 checksum, size, section and priority and
the filename. The section and priority are the values of the
corresponding fields in the main source control file. If no section
or priority is specified then `-' should be used, though section and
priority values must be specified for new packages to be installed
properly.
Given that the priority and section in the source package (and therefore
the .changes) are largely suggestions anyway, my reading of the above is
that they must be included for the first upload of a source package but
are technically optional after that.
Regards,
Adam
--
To unsubscribe, send mail to [email protected].