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

Bug#642833: Hmm, config-edit can be improved



* Dominique Dumont <dod@debian.org>, 2011-09-27, 16:21:
I was always under the impression that order of fields within a single paragraph doesn't matter in Debian control files.

Correct. But if you add "Extra fields", you may end up in trouble.

Consider the following (admitedly contrived) copyright paragraph:

Files: this license applies to any of them
License: GPL-1+
GPL-1+ yada yada

Is it:
- a "Files" paragraph with a License field ?
- a "License" paragraph with an extra "Files" field ?

As a human, I have an idea. But I don't know how a parser can resolve such ambuguity.

Yes, there is ambiguity; perhaps DEP-5 wording can be improved here. But, as you said, this example is contrived, and I don't see it as a practical problem.

FWIW, lintian uses this algorithm to determine type of a paragraph:

if it's not the header paragraph {
   if Files field exists {
     it's a files paragraph
   } elsif License field exists {
     it's a stand-alone license paragraph
   } else {
     it's a unknown paragraph type, emit a warning
   }
}

--
Jakub Wilk



Reply to: