Skip to content

Avoid duplicate Deb822 source reads#1

Open
Peter1169 wants to merge 1 commit into
SanchezTheCoder:synaptic-149-deb822-finishfrom
Peter1169:peter/deb822-readsources-dedup
Open

Avoid duplicate Deb822 source reads#1
Peter1169 wants to merge 1 commit into
SanchezTheCoder:synaptic-149-deb822-finishfrom
Peter1169:peter/deb822-readsources-dedup

Conversation

@Peter1169
Copy link
Copy Markdown

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_integration

All 11 Deb822 integration tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant