lib: filter overridden repository reverse dependencies - #697
Open
tuxkt wants to merge 1 commit into
Open
Conversation
xbps-query -RX concatenates reverse dependencies from all repositories, including packages overridden by an earlier repository. This can report multiple versions or dependencies removed by a local package override. Look up each reverse dependency by name in the repository pool and retain it only if its selected repository matches the current repository. Keep collecting unrelated reverse dependencies from later repositories. Add tests for cross-repository results, version and same-version overrides, virtual dependencies, and overrides in repositories without the target. Fixes void-linux#696.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
xbps-query -RXincludes reverse dependencies from overridden packages. For example, a localbarwith its dependency onfooremoved still appears in-RX foobecause the lower-priority repository'sbardepends on it.Resolve each reverse dependency by package name and filter out results from repositories other than the one selected by the pool. This preserves distinct reverse dependencies from later repositories and also handles overrides with identical package versions.
Fixes #696.
Validation:
c5f41d5.xbps-querytests pass with the fix, including real/virtual dependency queries and overrides from repositories without the target package.git diff --checkpasses.