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

Add relationships for ALPM packages (arch linux) #2851

Merged
merged 3 commits into from
May 7, 2024

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented May 7, 2024

Partially implements #572

This PR primarily adds dependency relationships for ALPM (arch linux) packages, associating only installed packages. The ALPM package metadata will describe all 'provides' and 'depends' elements that are used for relationship creation. This is consistent with other OS package catalogers doing the same thing, and allows for cases where partial dependencies are installed (thus there is not a complete relationship graph) at least the underlying package information that persists the desired dependency state would be captured.

This PR additionaly makes the following fixes:

  • The Backups field on ALPM metadata was not being populated (the wrong reader was referenced). This has been fixed
  • To account for additional source, refactoring the main parser path was necessary to keep linters happy
  • A small ruleguard linter correction was made (instead of checking for Closer twice, we check for Closer and Reader)
  • All instances of []AlpmFileRecord behave the same way now: empty collections are allocated (instead of remaining nil). Ideally these fields would be omitempty, however, that would be a breaking change and is not allowed at this time.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@github-actions github-actions bot added the json-schema Changes the json schema label May 7, 2024
@wagoodman wagoodman changed the title Add alpm relationships Add relationships for ALPM packages (arch linux) May 7, 2024
@wagoodman wagoodman self-assigned this May 7, 2024
@wagoodman wagoodman requested a review from a team May 7, 2024 14:58
@wagoodman wagoodman marked this pull request as ready for review May 7, 2024 14:58
@wagoodman wagoodman added the enhancement New feature or request label May 7, 2024
@wagoodman wagoodman merged commit ada8f00 into main May 7, 2024
11 checks passed
@wagoodman wagoodman deleted the add-alpm-relationships branch May 7, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request json-schema Changes the json schema
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants