Closed pietroalbini closed 1 year ago
Writing down in this comment the understanding I gathered from the experiments I did this morning.
There are two separate "sources" of information: the dep5
file, and the filesystem (both $path.license
and code comments). If a file is annotated with both "sources", both annotations will be emitted by reuse spdx
, resulting in an AND
.
Within a dep5 file, latter rules override former rules: if there is a *
rule followed by a foo.txt
rule, foo.txt
will have the license defined by the foo.txt
rule. If there is a bar.txt
rule followed by a *
rule, bar.txt
will have the license defined by the *
rule.
Within the filesystem, if both a $path.license
file and code comments are present, the code comments will be ignored.
Thanks. I agree that we should implement this rather sooner than later, since REUSE.yaml might still be a longer road.
REUSE currently looks at multiple sources when deciding what the license of a file should be, but the precedence of those sources is not documented in the specification. This results in people having to experiment on their own to determine what the current precedence is, which is not great. It would be nice if the current precedence would be written in the specification.
I know that in https://github.com/fsfe/reuse-docs/issues/70 there is an insightful discussion on what the precedence of information should be, keeping in mind the future
REUSE.yaml
file, but that is orthogonal to documenting the current behavior of the tool.