Currently, so far as I can see, nothing in the general discussion of the
syntax of control files prohibits repetition of the same field name in
one paragraph. For example:
Package: foo
Package: bar
However, I believe this should always be a syntax error. Lintian has a
check for this:
Tag: debian-control-with-duplicate-fields
Severity: serious
Certainty: certain
Info: One of the paragraphs of your debian/control contains the same
field more than once. This can lead to unexpected behaviour in
<tt>dpkg</tt> and <tt>apt</tt>.
(I haven't checked the assertion about unexpected behavior) and this
check is among those that ftpmaster uses to reject packages. I think
we should prohibit such duplicate fields in Policy as well.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-2-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
debian-policy depends on no packages.
debian-policy recommends no packages.
Versions of packages debian-policy suggests:
ii doc-base 0.9.5 utilities to manage online documen
-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
$ LANG=C dpkg-gencontrol -plibvte9
dpkg-gencontrol: error: syntax error in debian/control at line 29: duplicate field Architecture found
It's checked at build time at least.
> check is among those that ftpmaster uses to reject packages. I think
> we should prohibit such duplicate fields in Policy as well.
OK for me.
Cheers,
--
Raphaël Hertzog
> Currently, so far as I can see, nothing in the general discussion of the
> syntax of control files prohibits repetition of the same field name in
> one paragraph. For example:
> Package: foo
> Package: bar
> However, I believe this should always be a syntax error. Lintian has a
> check for this:
> Tag: debian-control-with-duplicate-fields
> Severity: serious
> Certainty: certain
> Info: One of the paragraphs of your debian/control contains the same
> field more than once. This can lead to unexpected behaviour in
> <tt>dpkg</tt> and <tt>apt</tt>.
> (I haven't checked the assertion about unexpected behavior) and this
> check is among those that ftpmaster uses to reject packages. I think we
> should prohibit such duplicate fields in Policy as well.
dpkg-dev checks this at build time, so this definitely seems to be the
right move. Here is a patch.
Objections or seconds?
diff --git a/policy.sgml b/policy.sgml
index 87b9795..99ab0ff 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -2398,6 +2398,11 @@ Package: libc6
</p>
<p>
+ Each paragraph may contain at most one instance of a particular
+ field name.
+ </p>
+
+ <p>
Many fields' values may span several lines; in this case
each continuation line must start with a space or a tab.
Any trailing spaces or tabs at the end of individual
--
Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/>
On 11/06/10 18:58, Russ Allbery wrote:
> dpkg-dev checks this at build time, so this definitely seems to be the
> right move. Here is a patch.
>
> Objections or seconds?
>
> diff --git a/policy.sgml b/policy.sgml
> index 87b9795..99ab0ff 100644
> --- a/policy.sgml
> +++ b/policy.sgml
> @@ -2398,6 +2398,11 @@ Package: libc6
> </p>
>
> <p>
> + Each paragraph may contain at most one instance of a particular
> + field name.
> + </p>
> +
> + <p>
> Many fields' values may span several lines; in this case
> each continuation line must start with a space or a tab.
> Any trailing spaces or tabs at the end of individual
>
Seconded,
Emilio
> Objections or seconds?
>
> diff --git a/policy.sgml b/policy.sgml
> index 87b9795..99ab0ff 100644
> --- a/policy.sgml
> +++ b/policy.sgml
> @@ -2398,6 +2398,11 @@ Package: libc6
> </p>
>
> <p>
> + Each paragraph may contain at most one instance of a particular
> + field name.
> + </p>
> +
> + <p>
> Many fields' values may span several lines; in this case
> each continuation line must start with a space or a tab.
> Any trailing spaces or tabs at the end of individual
>
Seconded.
Cheers,
Julien
Seconded.
--
Jakub Wilk
Hi Russ,
as a non-native speaker, I have difficulties with the use of 'may' in your
patch: if fields may be unique, they also may be not unique, so what is the
message in this sentence? It does not give me the impression that the goal
is to discourage the use of the same field name twice in the same paragraph.
How about “A paragraph should not contain data fields having the same name.”
Have a nice day,
--
Charles Plessy
Illkirch, France
See http://legal-dictionary.thefreedictionary.com/May
"2) in statutes, and sometimes in contracts, the word "may" must be read in
context to determine if it means an act is optional or mandatory, for it may be
an imperative."
You ought to read it as "must" in this context.
Not a native speaker either, so I may be mistaken :)
Cheers,
Emilio
Hi Charles,
In this sense 'may' should be read as 'must', however I think that if it
causes readability issues for non-native english speakers then the word
'must' should actually be used...
"Each paragraph must contain at most one instance of a particular
field name."
Is that clearer?
Cheers,
Andrew.
--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
Building more free and open source software for New Zealanders
------------------------------------------------------------------------
>> as a non-native speaker, I have difficulties with the use of 'may' in your
>> patch: if fields may be unique, they also may be not unique, so what is the
>> message in this sentence? It does not give me the impression that the goal
>> is to discourage the use of the same field name twice in the same paragraph.
>> How about “A paragraph should not contain data fields having the same name.”
> In this sense 'may' should be read as 'must', however I think that if it
> causes readability issues for non-native english speakers then the word
> 'must' should actually be used...
> "Each paragraph must contain at most one instance of a particular
> field name."
> Is that clearer?
Yes, indeed, that's what I meant; I'll go with that (assuming that doesn't
have a different clarity problem that I'm missing).
--
Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/>
--
>>> as a non-native speaker, I have difficulties with the use of 'may' in
>>> your patch: if fields may be unique, they also may be not unique, so
>>> what is the message in this sentence? It does not give me the
>>> impression that the goal is to discourage the use of the same field
>>> name twice in the same paragraph.
>>> How about “A paragraph should not contain data fields having the same
>>> name.”
>> In this sense 'may' should be read as 'must', however I think that if
>> it causes readability issues for non-native english speakers then the
>> word 'must' should actually be used...
>> "Each paragraph must contain at most one instance of a particular
>> field name."
>> Is that clearer?
> Yes, indeed, that's what I meant; I'll go with that (assuming that
> doesn't have a different clarity problem that I'm missing).
Hm, actually, better (slightly less awkward, I think):
A paragraph must not contain more than one instance of a particular
field name.
--
> >>> as a non-native speaker, I have difficulties with the use of 'may' in
> >>> your patch: if fields may be unique, they also may be not unique, so
> >>> what is the message in this sentence? It does not give me the
> >>> impression that the goal is to discourage the use of the same field
> >>> name twice in the same paragraph.
> >>> How about “A paragraph should not contain data fields having the same
> >>> name.”
> >> In this sense 'may' should be read as 'must', however I think that if
> >> it causes readability issues for non-native english speakers then the
> >> word 'must' should actually be used...
> >> "Each paragraph must contain at most one instance of a particular
> >> field name."
> >> Is that clearer?
> > Yes, indeed, that's what I meant; I'll go with that (assuming that
> > doesn't have a different clarity problem that I'm missing).
> Hm, actually, better (slightly less awkward, I think):
> A paragraph must not contain more than one instance of a particular
> field name.
Seconded.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slan...@ubuntu.com vor...@debian.org
Hi Russ,
This one is much clearer, thank you for the changes. I second them.
Thanks also to for the other answers, who made me progress in English.
Have a nice day,
--
Charles
--
Need to sign your mail.
Mraw,
KiBi.
Alright, sorry for the noise…
Not for Policy work. Some people do, but I never check them. I figure
the consequences here just aren't enough for there to be much risk of
someone impersonating someone else, and there's always a Policy maintainer
looking over the change and making sure it makes sense anyway.
--
Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/>
--
> Hm, actually, better (slightly less awkward, I think):
> A paragraph must not contain more than one instance of a particular
> field name.
This has now been merged for the next release.