Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Document current precedence of information #111

Closed
pietroalbini opened this issue Aug 18, 2022 · 2 comments · Fixed by #131
Closed

Document current precedence of information #111

pietroalbini opened this issue Aug 18, 2022 · 2 comments · Fixed by #131
Labels
enhancement New feature or request faq FAQ

Comments

@pietroalbini
Copy link

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 #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.

@pietroalbini
Copy link
Author

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.

@mxmehl
Copy link
Member

mxmehl commented Aug 19, 2022

Thanks. I agree that we should implement this rather sooner than later, since REUSE.yaml might still be a longer road.

@mxmehl mxmehl added enhancement New feature or request faq FAQ labels Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request faq FAQ
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants