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.
Summary
This PR adds support for package architecture variants such as
amd64v3.Ubuntu 26.04 publishes separate indexes such as:
while packages from the variant index still use:
This means a regular package and its architecture variant may have the same name, version and base architecture. Aptly currently treats them as the same package identity.
Approach
The patch introduces the concept of an index architecture:
amd64amd64v3The original
Architecture: amd64remains unchanged and continues to be used for dependency matching.Architecture variants are distinguished only where package or repository identity requires it.
The changes cover:
-force-replaceExisting packages without
Architecture-Variantretain their previous package keys and behavior.Validation
The implementation was tested with both automated tests and real Ubuntu 26.04 repositories.
A full Ubuntu 26.04 mirror was created for release, updates, security and backports, including
main,universe,restrictedandmultiverse, with bothamd64andamd64v3.A real Ubuntu 26.04 APT client successfully selected and installed the
amd64v3package when configured with:I also tested an in-place upgrade of an existing Aptly mirror database populated by unmodified upstream Aptly. The patched build added the previously discarded
amd64v3packages without requiring a mirror rebuild.The relevant test suites pass:
The remaining failures from
go test ./...are reproducible on the unmodified upstream source and are unrelated to this change.Additional upstream issues
Two pre-existing issues were found during development and are included as separate commits:
maximumVersion=1could collapse packages from different architectures.Both also affect ordinary non-variant packages.
I can split these into separate PRs if preferred.
Development process
For transparency, I developed this implementation with assistance from OpenAI Codex.
The resulting changes were reviewed and validated with regression tests, real Ubuntu 26.04 repositories, an existing Aptly database and a real APT client.
This is my first contribution to Aptly, so I am happy to adjust the implementation, naming, scope or commit structure to better match the project's conventions.