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

Bug#666726: debian-policy: Clarify if empty control fields are ollowed or not



Le Sun, Nov 23, 2014 at 04:14:14PM -0200, Henrique de Moraes Holschuh a écrit :
> On Mon, 24 Nov 2014, Charles Plessy wrote:
> > 
> > Then they are not empty: there is a big difference between "Depends:" and
> > "Depends: ${foo}".  I think that it would be very confusing if we would refer
> > them as empty.
> 
> Well, both are valid.  Can you suggest alternative wording?

Le Sun, Nov 23, 2014 at 08:09:29PM +0100, Bill Allombert a écrit :
> 
> This bug is mostly to document a check in dak. Are you suggesting the check is
> looking at the debian/control file and reject source packages with empty fields
> ?

Hi Henrique and Bill,

first, on the original purpose of this bug, it is to document that empty fields
in binary package control files are not supported and can crash tools such as
apt.  There, "empty" meant that the semicolon at the end of a field name is
followed by a newline character.  A member FTP team answered to the submitter
by confirming that binary packages with empty fields in their control file are
rejected from the Debian archive.

I think that we all agree to document that fields must not be empty in binary
package control files.  Let's see the other points under discussion. 

 * The definition of "empty".  Henrique has used the word "empty" to designate
   fields of a source package control file that contain a substitution variable
   that may not contain a value at build time.  I think that this complicates the
   defintion of "empty" too much, since in that case one has to build a package to
   determine if a field is empty or not.  The answer would even depend on the
   state of the archive !  Regarding the submitter's definition, it is a bit
   stricter than what the syntax of control fields allows, where a field in which
   the colon after the name is followed by spaces is also empty.

 * Whether to disallow empty fields in other control files.  I have not seen empty
   fields elsewhere, and I am not aware of plan to use some.  Empty fields are not
   used when a field is solely needed as a flag, such as the "Essential" field.
   Altogether, I think that it would be neater to clarify the section about the syntax
   of control files that fields must not be empty, than to make this a special
   restriction of binary package control files.

For the wording, if my original wording was too unclear, how about requesting
that all fields must have a value, so that there is no ambiguity on what
"empty" means ?  We could for instance add "Fields with no value are invalid."
at the end of the second paragraph of section 5.1.  (New patch attached).

Have a nice day,

-- 
Charles Plessy
Tsurumi, Kanagawa, Japan
>From 1cd63a7a20d4f1ff71fd68987f6efcbf3a5924d0 Mon Sep 17 00:00:00 2001
From: Charles Plessy <plessy@debian.org>
Date: Mon, 24 Nov 2014 08:53:10 +0900
Subject: [PATCH] Clarify that fields with no value are not valid.

Closes: #666726
---
 policy.sgml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/policy.sgml b/policy.sgml
index 7bb703b..daf0f12 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -2544,6 +2544,7 @@ endif
 	  space, and colon (i.e., characters in the ranges 33-57 and
 	  59-126, inclusive).  Field names must not begin with the comment
 	  character, <tt>#</tt>, nor with the hyphen character, <tt>-</tt>.
+	  Fields with no value are invalid.
 	</p>
 
 	<p>
-- 
2.1.1


Reply to: