Repository navigation
Conversation
somaz94
added a commit
to somaz94/somaz94
that referenced
this pull request
Nov 11, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1665 +/- ##
==========================================
- Coverage 77.91% 77.60% -0.32%
==========================================
Files 165 165
Lines 16141 16180 +39
==========================================
- Hits 12577 12557 -20
- Misses 2350 2408 +58
- Partials 1214 1215 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #1664
Requirements
All new code should be covered with tests, documentation should be updated. CI should pass.
Also, to speed up things, if you could kindly "Allow edits and access to secrets by maintainers" in the
PR settings, as this allows us to rebase the PR on master, fix conflicts, run coverage and help with
implementing code and tests.
Description of the Change
Ubuntu 26.10 indexes list packages with SHA512 only. The package pool derives its paths from SHA256 (or MD5 for legacy paths), so
Verifynever finds a file that was already downloaded, and everyaptly mirror updatefetches the whole mirror again.-skip-existing-packagesdoes not help either: the key built from the index hashes the MD5, SHA1 and SHA256 sums, which are all empty here, so it never matches the stored key, which was computed after the download filled in the full checksums.BuildDownloadQueuenow looks up the package with the same architecture, name and version from the previous update. When a file listed by SHA512 alone has a match there with the same name, size and SHA512, its pool path and full checksums are reused and the files hash is recomputed.Verifythen finds the file in the pool the same way it does for SHA256 indexes, and the key matches again for-skip-existing-packages. A file whose SHA512 changed is still downloaded.The new
TestDownloadSHA512OnlyFlatfails on master (the second update queues the package again) and passes with this change. It covers the default path,-skip-existing-packages, and an index whose SHA512 differs.go test ./deb/ ./files/ ./http/andgolangci-lint runpass locally. I did not add a system test since the change is in the queue building logic, but I can add one undert04_mirrorif you prefer.I used Claude Code to help trace the code path and write the test, and reviewed and ran everything myself.
Checklist
AUTHORS