Skip to content

GPL-2.0-only detected in GPL-2.0-or-later #5967

@pepper-jk

Description

@pepper-jk

Background

I am currently working on copyleft license compatibility rules. For this I created a test repository containing GPL-2.0-or-later and GPL-3.0 (later I added some CC licenses as well, but those are not relevant to the issue). Both license texts were copied from spdx.org.

Bug

When scanning said test repository, ORT detects both GPL-2.0-only and GPL-2.0-or-later, even though only GPL-2.0-or-later was added to the repo. This is due to the results of scancode:

- license: "GPL-2.0-only"
  location:
    path: "license-gpl-2.0-or-later.txt"
    start_line: 3
    end_line: 110
  score: 98.02
- license: "GPL-2.0-or-later"
  location:
    path: "license-gpl-2.0-or-later.txt"
    start_line: 110
    end_line: 114
  score: 100.0

As you can see scancode gives GPL-2.0-only a 98.02 score, even though it ignores the last 4 lines of the license text. And GPL-2.0-or-later only is detected in the last four lines.

I am not sure if this is caused by scancode direktly or by parameters set by ORT. Maybe you can help me clarify. And if only scancode is to blame, I will open an issue in their repo as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scannerAbout the scanner tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions