Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix package index ordering #147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dillon-giacoppo
Copy link

@dillon-giacoppo dillon-giacoppo commented Dec 22, 2024

Whilst dict ordering should preserve import order when iterated over keys, it looks like potentially .items() does not preserve insertion order. I can't reliably reproduce (assuming some non determinism is involved) but have examples such as the following:

bazel run @bookworm//:lock

WARNING: Download from https://snapshot-cloudflare.debian.org/archive/debian/20241221T204840Z/dists/bookworm/main/binary-amd64/Packages failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://snapshot-cloudflare.debian.org/archive/debian-security/20241221T204840Z/dists/bookworm-security/main/binary-amd64/Packages failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://snapshot-cloudflare.debian.org/archive/debian/20241221T204840Z/dists/bookworm-updates/main/binary-amd64/Packages failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://snapshot-cloudflare.debian.org/archive/debian/20241221T204840Z/dists/bookworm/main/binary-arm64/Packages failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://snapshot-cloudflare.debian.org/archive/debian-security/20241221T204840Z/dists/bookworm-security/main/binary-arm64/Packages failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://snapshot-cloudflare.debian.org/archive/debian/20241221T204840Z/dists/bookworm-updates/main/binary-arm64/Packages failed: class java.io.FileNotFoundException GET returned 404 Not Found

It should not be possible to see a 404 for the bare ../Packages URI without additional 404 errors for the compressed indexes such as Packages.xz.

Using a list of tuples will guarantee iteration order.

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