Skip to content

Commit 86a71a5

Browse files
committed
Correctly compute_normalized_license for alpine
* The license of Alpine installed system packages was not detected correctly. It now uses the Alpine specific procedure. Reference: aboutcode-org/scancode.io#478 Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent cf57905 commit 86a71a5

File tree

6 files changed

+5978
-15
lines changed

6 files changed

+5978
-15
lines changed

src/packagedcode/alpine.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ def parse(cls, location):
5858
package_type=cls.default_package_type,
5959
)
6060

61+
@classmethod
62+
def compute_normalized_license(cls, package):
63+
_declared, detected = detect_declared_license(package.declared_license)
64+
return detected
65+
6166
@classmethod
6267
def assemble(cls, package_data, resource, codebase):
6368
# get the root resource of the rootfs
@@ -76,6 +81,7 @@ def assemble(cls, package_data, resource, codebase):
7681

7782
package.license_expression = cls.compute_normalized_license(package)
7883

84+
7985
dependent_packages = package_data.dependencies
8086
if dependent_packages:
8187
yield from models.Dependency.from_dependent_packages(
14.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)