Avoid duplicate Deb822 source reads#1
Open
Peter1169 wants to merge 1 commit into
Open
Conversation
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.
This adds one more small fix on top of #1.
SourcesList::ReadSources() currently reads Deb822 files once via Dir::Etc::sourcelist.d and then again via Dir::Etc::sourceparts. When those resolve to the same source parts directory, each .sources stanza is added twice to the repository list.
This keeps Deb822 discovery tied to Dir::Etc::sourceparts, next to the existing legacy .list scan, and adds a regression test that sets both config entries to the same temporary directory and verifies only one Deb822 record is loaded.
Verified in a Debian testing container with:
sh ./autogen.sh ./configure --prefix=/usr make -C common -j2 make -C tests -j2 test_deb822_integration ./tests/test_deb822_integrationAll 11 Deb822 integration tests pass.