Add relationships for ALPM packages (arch linux) #2851
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Backups
field on ALPM metadata was not being populated (the wrong reader was referenced). This has been fixed[]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.