-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Intro / example use case
I recently got into the situation where I needed to glob two types of files with the same extension, but treat them differently license-wise.
Let me show you this with an example (only the relevant parts):
# config files are not copyrightable
[[annotations]]
path = ["**/.*config", "**/*.properties"]
SPDX-License-Identifier = "CC0-1.0"
# i18n and l10n
[[annotations]]
path = ["**/bundle*.properties","**/Language.properties" , "**/Language_??.properties"]
SPDX-License-Identifier = "GPL-3.0-only"When I check what license reuse tool finds a file matching **/Language.properties to be under (with this workaround I use until fsfe/reuse-tool#1106 gets done):
reuse spdx > reuse.spdx
grep "Language.properties" reuse.spdx --after-context=6 --before-context=1 | grep LicenseInfoI (rightly) expect it to say GPL-3.0-only, which is also what happens:
LicenseInfoInFile: GPL-3.0-onlyBut when I check what license reuse tool finds a file matching **/Language_??.properties with:
reuse spdx > reuse.spdx
grep "Language_en.properties" reuse.spdx --after-context=6 --before-context=1 | grep LicenseInfoI (wrongly) expect it to override again, but instead I get the following result:
LicenseInfoInFile: CC0-1.0Discussion / actual question
So, the question is, are * and ** enough for globbing, or do we need something more flexible?
If we need something more flexible, are ? enough, or do we need to go further (e.g. [a-z], [0-9], [a,f,v])? Maybe a full globbing system even?
Personally, I’m undecided right now. The above issue I can resolve with *, but I will see if I run into an unsolvable situation while I REUSE-ify the behemoth that is Liferay Portal code base.
My example I present here more as an anecdotal potential symptom to start the discussion.