-
Notifications
You must be signed in to change notification settings - Fork 8
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
InvalidSPDXAnalysisException with Missing SPDX element for ID is thrown #61
Comments
The current SPDX model has the relationships as a property of the SPDX element, so it needs to be in the current SPDX document so it can be added to the element. Reference the SPDX 2.3 model diagram Element class - you'll see relationship is a property. Note that in the SPDX 3.0 model relationships are standalone - actually, elements themselves, so we can fix it once SPDX 3.0 is implemented. |
Thank you for your response. Example:
which is defined as
And as you can see in the first code line above I loaded recipe-gettext-minimal-native just before. Do you have any hint how to solve this? |
I don't have any great solutions, but I can think of a few possibilities (all admittedly less than perfect):
|
I do it in a different way now. I assume that the spdxElement always gets the relationship. This works now for
If spdxElement is a TypedValue nothing has changed. As soon as a I have my clearance from my company to distribute to OSS I will try to create a fork and pull request. |
Thanks @chbaeumer - I look forward to the PR. |
The function restoreRelationships is throwing an InvalidSPDXAnalysisException if an element for the given elementId cannot be found within the addedElements, i.e. the elements of the current SPDX file.
Due to the definition of the SPDX we have a lot relationship types where the order is reversed like CONTAINED_BY, GENERATED_FROM, etc. In this cases I would expect that addedFiles contains the relatedSpdxElement.
The text was updated successfully, but these errors were encountered: