Skip to content

Duplicated key name error for conjunctive license expression #343

@JonoYang

Description

@JonoYang

aboutcode-toolkit throws this error on this about file because of the conjunctive license expression:

ABOUT file:

about_resource: ansible-2.7.0.tar.gz
attribute: true
checksum_md5: 6a6f2dd82cfed72bc06204c0b0b2901c
checksum_sha1: 6ad044cfc9e7a33f07fee3304f688bacd43631a7
copyright: Copyright (c) Ansible contributors
description: Ansible is a radically simple IT automation platform that makes your
    applications and systems easier to deploy. Avoid writing scripts or custom code
    to deploy and update your applications— automate in a language that approaches
    plain English, using SSH, with no agents to install on remote systems.
download_url: https://files.pythonhosted.org/packages/7c/4f/a1843687642b8e33637e312b9fb17ca7f68be0641131a92d883368dc6d1c/ansible-2.7.0.tar.gz
homepage_url: https://www.ansible.com/
license_expression: gpl-3.0-plus AND other-permissive AND other-copyleft
licenses:
-   file: gpl-3.0-plus.LICENSE
    key: gpl-3.0-plus
    name: GNU General Public License 3.0 or later
-   file: other-copyleft.LICENSE
    key: other-copyleft
    name: Other Copyleft Licenses
-   file: other-permissive.LICENSE
    key: other-permissive
    name: Other Permissive Licenses
name: Ansible
notice_file: ansible-2.7.0.tar.gz.NOTICE
owner: Ansible Project
owner_url: https://github.com/ansible
redistribute: true
track_changes: true
vcs_repository: https://github.com/ansible/ansible
version: 2.7.0

Error:

$ bin/about-code check thirdparty/
Running aboutcode-toolkit version 3.1.1
Checking ABOUT files...
ERROR: infra/ansible-2.7.0.tar.gz.ABOUT: Duplicated key name(s): ['-   file', '-   file']
Found 1 errors.

This is the license expression and list of license file associated with it:

...
license_expression: gpl-3.0-plus AND other-permissive AND other-copyleft
licenses:
-   file: gpl-3.0-plus.LICENSE
    key: gpl-3.0-plus
    name: GNU General Public License 3.0 or later
-   file: other-copyleft.LICENSE
    key: other-copyleft
    name: Other Copyleft Licenses
-   file: other-permissive.LICENSE
    key: other-permissive
    name: Other Permissive Licenses
...

I would expect that the licenses category should be able to have an arbitrary amount of license files under it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions