Sam Hocevar wrote: > ACK. I edited the wiki to reflect your and Zack's view which seems to > be the preferred way. > > For the sake of simplicity, I interpreted "most specific" as "matches > the fewer files". It has the drawback of possibly changing with the > contents of the source tree, but I fear that any other interpretation is > going to be ambiguous in some annoying cornercases.
I belive that it's possible to implement specificity comparison without looking at the source tree. Consider a glob parser that counts how many characters of the filename are matched using literals in the glob ("[a-zA-Z]"), how many are matched using ? and how many using *. The comparison is then using the perl <=> operator: literalsA <=> literalsB || questionsA <=> questionsB || starsA <=> starsB || disambiguateA <=> disambiguateB The disambiguation function needs to handle cases where two globs somehow still matched equally. For example, for file "foo", "f??" and "?o?" both match equal numbers of liternals and questions. Seems that something arbitrary has to be done here, but it can be as simple as saying that the glob with the most specific leftmost side is most specific. (Leaving definition of "leftmost" to the implementor, because I have to run.) > Any idea on how to fix that? I tend to reformat license texts with > leading "|"s quite often so this didn't really strike me as particularly > ugly. 822 seemed like a safe way to escape a license text; if the dots > are really an issue, one can use U+00A0 NO-BREAK SPACE or U+FEFF ZERO > WIDTH NO-BREAK SPACE or anything crazy like that. License: BSD-ish Licensed under a 2-clause version of the BSD license, included below. License: GPL-2+ Some portions are licensed under the GPL version 2, or above. The full text of the GPL can be found in /usr/share/common-licenses/GPL-2 on Debian systems. ... [debconf license here] ? > > * It's a shame that the boilerplate about where to find the full text of > > the GPL is still needed at the end of the file. One way to avoid this > > might be to use: > > > > License: /usr/share/common-licenses/GPL-2 > > > > The info about which versions apply would need to be expressed some > > other way though. > > ACK. How about parentheses?: > > License: GPLv2+ (/usr/share/common-licenses/GPL-2) | MPL | LGPLv2.1 > (/usr/share/common-licenses/LGPL-2.1) > > The drawback is that the lines can now become very long, and wrapping > them means it's no longer possible to say "first line is license list, > the rest is freeform text". But we can live with long lines, I guess. Yeah, on second thought I sorta prefer the example above, of sticking the boilerplate in the extended description. This assumes that licenses with an extended description can still be standard licenses. -- see shy jo
signature.asc
Description: Digital signature