Russ Allbery <r...@debian.org> writes:

> 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/>



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to