Guillem Jover <guil...@debian.org> writes:
> On Mon, 2020-06-22 at 18:51:21 -0700, Felix Lechner wrote:

>> Starting with an upcoming release, Lintian will check for the presence
>> of required and recommended fields in various packaging control files.
>> Our methods are probably not perfect, but it was brought to my
>> attention that 'dpkg-buildpackage -S' produces *.changes files without
>> 'Binary' and 'Description' fields.

> This is due to a fix in dpkg 1.19.3 prompted by #818618, which brought up
> an inconsistency in the handling of these fields
> (commit 4a4619831de8b8972f86b489660dc98f187cfa34 in dpkg.git). DAK got
> also fixed to accept these .changes files.

[...]

> The deb-changes(5) and policy state that these fields contain
> information for binary packages being uploaded. On a source-only upload,
> there are no such binaries, so the definition was internally
> inconsistent.  I think the only thing missing is policy clarifying that
> this field is only mandatory on non-source-only uploads.

Here is a patch to fix this wording in Policy.  I think it's ready for
seconds.

-- 
Russ Allbery (r...@debian.org)              <https://www.eyrie.org/~eagle/>

>From c98654d7effa875c6e11da16159ac3feded8f763 Mon Sep 17 00:00:00 2001
From: Russ Allbery <r...@debian.org>
Date: Tue, 20 Sep 2022 21:17:55 -0700
Subject: [PATCH] Binary and Description optional in .changes

In .changes files for source-only uploads, the Binary and
Description fields are not present.  Document this, and be clearer
in the description of the Description field for .changes files that
only descriptions of binary packages are included.
---
 policy/ch-controlfields.rst | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
index 428b8a7..f85f75d 100644
--- a/policy/ch-controlfields.rst
+++ b/policy/ch-controlfields.rst
@@ -278,7 +278,7 @@ The fields in this file are:
 
 -  :ref:`Source <s-f-Source>` (mandatory)
 
--  :ref:`Binary <s-f-Binary>` (mandatory)
+-  :ref:`Binary <s-f-Binary>`
 
 -  :ref:`Architecture <s-f-Architecture>` (mandatory)
 
@@ -292,7 +292,7 @@ The fields in this file are:
 
 -  :ref:`Changed-By <s-f-Changed-By>`
 
--  :ref:`Description <s-f-Description>` (mandatory)
+-  :ref:`Description <s-f-Description>`
 
 -  :ref:`Closes <s-f-Closes>`
 
@@ -809,12 +809,13 @@ See :ref:`s-descriptions` for further information on
 this.
 
 In a ``.changes`` file, the ``Description`` field contains a summary of
-the descriptions for the packages being uploaded. For this case, the
-first line of the field value (the part on the same line as
-``Description:``) is always empty. It is a multiline field, with one
-line per package. Each line is indented by one space and contains the
-name of a binary package, a space, a hyphen (``-``), a space, and the
-short description line from that package.
+the descriptions of the binary packages being uploaded. (``.changes``
+files for uploads containing only source packages will not have this
+field.) For this case, the first line of the field value (the part on the
+same line as ``Description:``) is always empty. It is a multiline field,
+with one line per binary package. Each line is indented by one space and
+contains the name of a binary package, a space, a hyphen (``-``), a space,
+and the short description line from that package.
 
 .. _s-f-Distribution:
 
@@ -924,7 +925,8 @@ every architecture. The source control file doesn't contain details of
 which architectures are appropriate for which of the binary packages.
 
 When it appears in a ``.changes`` file, it lists the names of the binary
-packages being uploaded, separated by whitespace (not commas).
+packages being uploaded, separated by whitespace (not commas). If only
+source packages are being uploaded, this field will not be present.
 
 .. _s-f-Installed-Size:
 
-- 
2.37.2

Reply via email to