Skip to content

Translation file wrongly considered as "GPL-2.0-only WITH eCos-exception-2.0" #3836

Description

@stefan6419846

Description

https://github.com/jazzband/django-simple-history/raw/master/simple_history/locale/zh_Hans/LC_MESSAGES/django.po is being wrongly detected as being GPL-2.0-only WITH eCos-exception-2.0 AND LicenseRef-scancode-free-unknown, although it just states:

This file is distributed under the same license as the django-simple-history package.

I would expect it to be detected as LicenseRef-scancode-free-unknown as the other translation files of the package.

How To Reproduce

  • wget https://github.com/jazzband/django-simple-history/raw/08b4de7c4a7ba71e64c108e985cfe2c6786e3061/simple_history/locale/zh_Hans/LC_MESSAGES/django.po
  • scancode -l --license-text --license-text-diagnostics --yaml error.yml django.po
  • cat error.yml

Result

headers:
    -   tool_name: scancode-toolkit
        tool_version: 32.2.0
        options:
            input:
                - django.po
            --license: yes
            --license-text: yes
            --license-text-diagnostics: yes
            --yaml: error.yml
        notice: |
            Generated with ScanCode and provided on an "AS IS" BASIS, WITHOUT WARRANTIES
            OR CONDITIONS OF ANY KIND, either express or implied. No content created from
            ScanCode should be considered or used as legal advice. Consult an Attorney
            for any legal advice.
            ScanCode is a free software code scanning tool from nexB Inc. and others.
            Visit https://github.com/nexB/scancode-toolkit/ for support and download.
        start_timestamp: '2024-06-27T122002.133763'
        end_timestamp: '2024-06-27T122004.820078'
        output_format_version: 3.2.0
        duration: '2.6863296031951904'
        message:
        errors: []
        warnings: []
        extra_data:
            system_environment:
                operating_system: linux
                cpu_architecture: 64
                platform: Linux-5.14.21-150400.24.100-default-x86_64-with-glibc2.31
                platform_version: '#1 SMP PREEMPT_DYNAMIC Mon Dec 4 19:12:13 UTC 2023 (3f5cd84)'
                python_version: 3.9.18 (main, Sep 06 2023, 07:49:32) [GCC]
            spdx_license_list_version: '3.24'
            files_count: 1
license_detections:
    -   identifier: free_unknown-fddf748a-9953-bc6c-cb9d-91001840e335
        license_expression: free-unknown
        license_expression_spdx: LicenseRef-scancode-free-unknown
        detection_count: 1
        reference_matches:
            -   license_expression: free-unknown
                license_expression_spdx: LicenseRef-scancode-free-unknown
                from_file: django.po
                start_line: 3
                end_line: 3
                matcher: 2-aho
                score: '100.0'
                matched_length: 10
                match_coverage: '100.0'
                rule_relevance: 100
                rule_identifier: free-unknown-package_4.RULE
                rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_4.RULE
                matched_text: '# This file is distributed under the same license as the django-simple-history
                    package.'
                matched_text_diagnostics: This file is distributed under the same license as
                    the
    -   identifier: gpl_2_0_with_ecos_exception_2_0-d214425d-9f73-8a07-2f4f-e54c2224cb76
        license_expression: gpl-2.0 WITH ecos-exception-2.0
        license_expression_spdx: GPL-2.0-only WITH eCos-exception-2.0
        detection_count: 1
        reference_matches:
            -   license_expression: gpl-2.0 WITH ecos-exception-2.0
                license_expression_spdx: GPL-2.0-only WITH eCos-exception-2.0
                from_file: django.po
                start_line: 2
                end_line: 3
                matcher: 3-seq
                score: '6.59'
                matched_length: 6
                match_coverage: '6.59'
                rule_relevance: 100
                rule_identifier: gpl-2.0_with_ecos-exception-2.0_2.RULE
                rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_with_ecos-exception-2.0_2.RULE
                matched_text: |
                    # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
                    # This file is distributed under the same license as the django-simple-history package.
                matched_text_diagnostics: |
                    PACKAGE'[S] [COPYRIGHT] [HOLDER]
                    # [This] [file] is distributed under the [same] license
files:
    -   path: django.po
        type: file
        detected_license_expression: gpl-2.0 WITH ecos-exception-2.0 AND free-unknown
        detected_license_expression_spdx: GPL-2.0-only WITH eCos-exception-2.0 AND LicenseRef-scancode-free-unknown
        license_detections:
            -   license_expression: gpl-2.0 WITH ecos-exception-2.0
                license_expression_spdx: GPL-2.0-only WITH eCos-exception-2.0
                matches:
                    -   license_expression: gpl-2.0 WITH ecos-exception-2.0
                        spdx_license_expression: GPL-2.0-only WITH eCos-exception-2.0
                        from_file: django.po
                        start_line: 2
                        end_line: 3
                        matcher: 3-seq
                        score: '6.59'
                        matched_length: 6
                        match_coverage: '6.59'
                        rule_relevance: 100
                        rule_identifier: gpl-2.0_with_ecos-exception-2.0_2.RULE
                        rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_with_ecos-exception-2.0_2.RULE
                        matched_text: |
                            # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
                            # This file is distributed under the same license as the django-simple-history package.
                        matched_text_diagnostics: |
                            PACKAGE'[S] [COPYRIGHT] [HOLDER]
                            # [This] [file] is distributed under the [same] license
                identifier: gpl_2_0_with_ecos_exception_2_0-d214425d-9f73-8a07-2f4f-e54c2224cb76
            -   license_expression: free-unknown
                license_expression_spdx: LicenseRef-scancode-free-unknown
                matches:
                    -   license_expression: free-unknown
                        spdx_license_expression: LicenseRef-scancode-free-unknown
                        from_file: django.po
                        start_line: 3
                        end_line: 3
                        matcher: 2-aho
                        score: '100.0'
                        matched_length: 10
                        match_coverage: '100.0'
                        rule_relevance: 100
                        rule_identifier: free-unknown-package_4.RULE
                        rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/free-unknown-package_4.RULE
                        matched_text: '# This file is distributed under the same license as
                            the django-simple-history package.'
                        matched_text_diagnostics: This file is distributed under the same license
                            as the
                identifier: free_unknown-fddf748a-9953-bc6c-cb9d-91001840e335
        license_clues: []
        percentage_of_license_text: '2.12'
        scan_errors: []

System configuration

OpenSUSE Leap 15.4, running Python 3.9 with scancode-toolkit==32.2.0, installed from PIP

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions