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

Can not add relationshps to an ExternalSpdxElement #162

Open
vargenau opened this issue Jul 9, 2024 · 1 comment
Open

Can not add relationshps to an ExternalSpdxElement #162

vargenau opened this issue Jul 9, 2024 · 1 comment

Comments

@vargenau
Copy link
Contributor

vargenau commented Jul 9, 2024

example6-bin.spdx.txt
This file is from spdx-examples/software/example6/spdx2.2

Tools Python says the file is valid SPDX.

Tools Java 1.1.8 says it is invalid:

Analysis exception processing SPDX file: Can not add relationshps to an ExternalSpdxElement. 
These changes must be done to the local SPDX element in the document which defines the SPDX element.

Who is right?

@goneall
Copy link
Member

goneall commented Jul 9, 2024

Preventing writes to the external element is intentional. A couple of thoughts:

  • In SPDX 2.X, the relationship is a property of the Element. Since the relationships are serialized along with the Element, we should not allow updates since they can not be written out.
  • In SPDX 3.X, relationships are not properties of the Element, they are stand-alone elements with a to and from property - so they can be "added" independent of the Element. We will be able to add relationships to external elements only for the 3.X spec versions - once the code for SPDX 3.X is complete.

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

No branches or pull requests

2 participants