aboutcode-org / aboutcode-org/scancode-toolkit

False positive: LGPL-2.1 file detected as "LGPL-3.0-only AND GPL-1.0-or-later"

未關閉
#4,992 8 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Python
星號
2.6k
分支
791
平均合併
1 天 12 小時
30 天內合併 PR
5

描述

### Description

Scanning `src/yp_order.c` from `libnsl` v2.0.1 reports `LGPL-3.0-only AND GPL-1.0-or-later`.
and "identifier": "lgpl_3_0_and_gpl_1_0_plus-d1207106-f72f-146f-6eb1-6008c11de4ee",

The file header states that the file is under GNU Lesser General Public License in version 2.1

Source file:
https://github.com/thkukuk/libnsl/blob/v2.0.1/src/yp_order.c

Expected license detection: `LGPL-2.1-only`

Actual license detection: `LGPL-3.0-only AND GPL-1.0-or-later`

This appears to be a false positive caused by the license text mentioning "GNU Lesser General Public License" and later "GNU General Public License" in the warranty/copy notice text, even though the version stated in the header is LGPL version 2.1.

### How To Reproduce

```bash
wget https://github.com/thkukuk/libnsl/archive/refs/tags/v2.0.1.zip
unzip v2.0.1.zip
scancode --license --json-pp result.json libnsl-2.0.1/src/yp_order.c
```

### System configuration

OS: macOS 26.3.1 (x86_64)
ScanCode Toolkit version: 32.5.0
Installation method: pip

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。