Modifying Files-Excluded pattern specification

Nicolas Boulenguez nicolas at debian.org
Sat Mar 22 13:00:40 UTC 2014


In-Reply-To=<20140321105301.GE18098 at an3as.eu>

Package: debian-policy
Followup-For: Bug #685506

Joachim Breitner wrote:
> File-Excluded: foo/bar.js to exclude
>  * foo/bar.js (in case of a dirty tarball)
>  * pkg-1.0/foo/bar.js (as in your implementation) as well as
>  * pkg-1.0/docs/foo/bar.js (this would be new
> the easiest, as it will conceivably stand less in the way of the
> developers, i.e. he would _not_ have to first look up the precise semantics.

Andreas Tille wrote:
> it is really flexible

The same effect was available with "*foo/bar.js" or the more accurate
"foo/bar.js */foo/bar.js".

Imagine an upstream providing two implementations, a default non free
"imp.c" and a free alternative "gpl/imp.c". The maintainer cannot
remove the former while keeping the latter anymore.

I call this less flexible, but I may miss your point.


The problem that you are trying to solve also affects license
attribution.
In your example of an upstream accidentally including a ".mytags" file
next to "pkg-1.0/" in the tarball, then specific Files patterns will
probably fail to match the new paths, so the whole package will be
considered as covered by the default license (Files: *).
If a work-around is ever adopted, it should be a dep5 update, not
create a divergence specific to Files-Excluded.


The Files and Files-Excluded fields share the same pattern syntax.
The new schem implies that:
- "a" matches "foo/a" in Files-Excluded, not in Files
Such an inconsistency create confusion, and will probably delay
acceptance of Files-Excluded into dep5.

Moreover, I consider that existing inconsistencies like
- "[ab]" matches "a" in Files-Excluded, not in Files
- "{a,b}" matches "a" in Files-Excluded, not in Files
- "a/" matches subdirectory "a" in Files-Excluded, not in Files
should be removed.

Imagine for example that upstream relicenses files under the "subdir"
directory. The maintainer will probably replace
  Files-Excluded: subdir/

  Files: *
  License: GPL-3
with
  Files: *
  License: GPL-3

  Files: subdir/
  License: GPL-2
This is valid, but last stanza is silently ignored.
I think that forcing users to write
  Files-Excluded: subdir*
or the more accurate "subdir subdir/*" from the beginning avoids
problems in the long term.


Thanks for making Files-Excluded a reality!
Please CC me as I am not subscribed to the list.



More information about the devscripts-devel mailing list