aboutcode-org / aboutcode-org/scancode-toolkit

Alpine APKBUILD matched license text is incorrect with --package

Đang mở
#4,307 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
bug improve-license-detection package-license-detection
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

For instance, this APKBUILD:
```shell
# Contributor: Oliver Smith
# Maintainer: Natanael Copa
pkgname=linux-firmware
pkgver=20201218
pkgrel=0
pkgdesc="firmware files for linux"
url="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary"
arch="all"
license="custom:multiple"
```
will yield a correct extracted_license_statement and an incorrect matched text
```JSON
{
"type": "alpine",
"namespace": null,
"name": "linux-firmware",
"version": "20201218-r0",
.......
"declared_license_expression": "unknown-license-reference",
"declared_license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
"license_detections": [
{
"license_expression": "unknown-license-reference",
"license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
"matches": [
{
"license_expression": "unknown-license-reference",
"license_expression_spdx": "LicenseRef-scancode-unknown-license-reference",
"from_file": null,
"start_line": 1,
"end_line": 1,
"matcher": "1-hash",
"score": 100.0,
"matched_length": 5,
"match_coverage": 100.0,
"rule_relevance": 100,
"rule_identifier": "unknown-license-reference_421.RULE",
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_421.RULE",
"matched_text": "licenseref-scancode-unknown-license-reference"
}
],
"identifier": "unknown_license_reference-9aed0e23-afe9-af3b-c9a4-e4121dca0810"
}
],
"other_license_expression": null,
"other_license_expression_spdx": null,
"other_license_detections": [],
"extracted_license_statement": "custom:multiple",
.......

```

The ` "matched_text": "licenseref-scancode-unknown-license-reference"` is incorrect .... this is not what the extracted license statement contains.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.