Skip to content

Commit

Permalink
Documentation: Add repository license choice to ort.yml documentation
Browse files Browse the repository at this point in the history
Resolves oss-review-toolkit#3396.

Signed-off-by: Stephanie Neubauer <Stephanie.Neubauer@bosch.io>
  • Loading branch information
neubs-bsi committed Mar 26, 2021
1 parent 24f5dc8 commit 5388f7f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/config-file-ort-yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ resolutions:
### When to Use License Choices

For multi-licensed dependencies a specific license can be selected.
The license choice can be applied to a package.
The license choice can be applied to a package or globally to an SPDX expression in the project.
A choice is only valid for licenses combined with the SPDX operator `OR`.
The choices are applied in the evaluator, and the reporter to the effective license of a package, which is calculated
by the chosen [LicenseView](../model/src/main/kotlin/licenses/LicenseView.kt).
Expand Down Expand Up @@ -300,6 +300,22 @@ license_choices:
# The result would be: C AND E
```

### License Choice for the Project

To globally select a license from an SPDX expression, that offers a choice, an SPDX expression for a `given` and a
`choice` must be provided.
The `choice` is applied to the whole `given` SPDX expression.
The license choices for a project can be overwritten by applying a
[license choice to a package](#license-choice-by-package).

e.g.
```yaml
license_choices:
repository_license_choice:
- given: "A OR B"
choice: "B"
```

---
**NOTE**

Expand Down

0 comments on commit 5388f7f

Please sign in to comment.