Skip to content

Add relationships for ALPM packages (arch linux)#2851

Merged
wagoodman merged 3 commits intomainfrom
add-alpm-relationships
May 7, 2024
Merged

Add relationships for ALPM packages (arch linux)#2851
wagoodman merged 3 commits intomainfrom
add-alpm-relationships

Conversation

@wagoodman
Copy link
Copy Markdown
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.

wagoodman added 3 commits May 7, 2024 10:48
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
@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