Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve the original order of copyrights in SPDX output #3457

Open
armintaenzertng opened this issue Jul 18, 2023 · 2 comments
Open

Preserve the original order of copyrights in SPDX output #3457

armintaenzertng opened this issue Jul 18, 2023 · 2 comments
Labels

Comments

@armintaenzertng
Copy link
Contributor

Description

Based on this comment:

[In SPDX output,] we should not use a set [for copyrights] and instead preserve the original order of copyrights: it matters.

@pombredanne
Copy link
Member

FWIW, the order of copyrights does matter as the first one is usually the primary copyright. To keep the insertion order, you can use a list and at last do something like:

def unique(objects):
    """
    Return a list of unique objects.
    """
    uniques = []
    for obj in objects:
        if obj not in uniques:
            uniques.append(obj)
    return uniques

Or do the same on the fly. Or use an ordered set. Or a use a dict using only keys.

@mjherzog
Copy link
Member

I agree that we should keep the original order, but there are no standards here. In general the first copyright notice is/should be the most recent but that is different from primary. In many cases the most recent copyright notice is for a minor change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants