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

Support more relationship types #50

Open
simoncozens opened this issue Sep 16, 2024 · 0 comments
Open

Support more relationship types #50

simoncozens opened this issue Sep 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@simoncozens
Copy link

Currently the SPDX generator assumes that the source of a relationship is always a package, and the target is either a package or a file:

source_ident = self.bom.package_ident(
self._get_element(
relationship["source"], relationship["source_id"]
)
)
if relationship.get("target_type") == "file":
target_ident = self.bom.file_ident(
self._get_element(
relationship["target"], relationship["target_id"]
)
)
else:
target_ident = self.bom.package_ident(
self._get_element(
relationship["target"], relationship["target_id"]
)
)

SPDX relationships may occur between any elements:

This field provides information about the relationship between two SPDX elements. For example, you can represent a relationship between two different Files, between a Package and a File, between two Packages, or between one SPDXDocument and another SPDXDocument.

@anthonyharrison anthonyharrison added the enhancement New feature or request label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants