From fed0cd3ac3d83fcdaed644d87ea9ecfdf8f7d7c5 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Tue, 12 Dec 2023 18:33:42 +0100 Subject: [PATCH] fix(evaluator): Apply repository license choices to the project This is a follow-up to e5e0f3f. Signed-off-by: Sebastian Schuberth --- evaluator/src/main/resources/rules/osadl.rules.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/evaluator/src/main/resources/rules/osadl.rules.kts b/evaluator/src/main/resources/rules/osadl.rules.kts index 98c2d21d4f3ad..d3a530ebc0bc6 100644 --- a/evaluator/src/main/resources/rules/osadl.rules.kts +++ b/evaluator/src/main/resources/rules/osadl.rules.kts @@ -37,7 +37,9 @@ val ruleSet = ruleSet(ortResult, licenseInfoResolver) { -isExcluded() } - val projectLicenseInfo = licenseInfoResolver.resolveLicenseInfo(project.id).filter(licenseView).filterExcluded() + val projectLicenseInfo = licenseInfoResolver.resolveLicenseInfo(project.id).filterExcluded() + .applyChoices(ortResult.getRepositoryLicenseChoices(), licenseView) + val outboundLicenses = projectLicenseInfo.licenses.map { it.license } // Define a rule that is executed for each license of the dependency.