[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#998115: lintian: false positive: "unknown-field Description" in source package



Control: tag -1 moreinfo


Hi.

On Sat, Oct 30, 2021 at 04:01:30PM +0200, Hannah Rittich wrote:
> Adding a "Description" field in the source section of a control file
> will cause lintian to issue the error "source: unknown-field Description".

I think you misunderstood the Policy here.

> The Debian Policy Manual [1] states that "in a source or binary control
> file, the Description field contains a description of the binary package
> [...]".

expanding the sentence above, that's "source control file" or "binary
control file".
The former is your debian/control, the letter is DEBIAN/control inside a
.deb.

That line is just saying "this field is used in these kind of files",
not actually describing where in those files that field can be used.
For that, you need to go to
file:///usr/share/doc/debian-policy/policy.html/ch-controlfields.html#source-package-control-files-debian-control
that clearly says that Description is only allowed the binary
paragraphs.

> This field can be used to avoid
> repetitions in the control file, as done by the abseil package [3],
> which displays the said error message [4].

You should use a non-standard field for that, meaning those fields that
start with X-.  Those are documented in deb-src-control(5) and not in
Policy (since they are non-standard after all).

For example, use X-Synopsis in the source paragarph, and refer to it
with a ${S:X-Synopsis} substvar or such.

> Furthermore, deb-substvars allows to reference the description
> field of the source package, using the variables ${source:Synopsis} and
> ${source:Extended-Description} [2].

Uh.  TIL.  However I find that odd.
Regardless, that's dpkg's choice, and not Policy.

I asked to the dpkg maintainers whether they had an intention to propose
a corresponding Policy change for it, since TTBOMK, Description was
never used in the source paragarph.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
More about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature


Reply to: