repo: allow for architecture-specific stage-packages
Metadata
Current evaluation
Merged. Implements architecture-specific stage-packages using a package:arch syntax in the stage-packages list. A per-part architecture approach was rejected during review. The updated code passed CI and was merged.
Suggested action: —
No scores available.
Issue body
This makes it possible to instruct snapcraft to only install some
packages on a given architecture or set of architectures by making a part specific to a particular architecture.
LP: #1637282
Signed-off-by: Stéphane Graber stgraber@ubuntu.com
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Implements architecture-specific stage-packages using a package:arch syntax in the stage-packages list. A per-part architecture approach was rejected during review. The updated code passed CI and was merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged architecture-specific stage-packages support in snapcraft. Implemented package:arch syntax for stage-package lists, replacing rejected per-part architecture fields and slash syntax to avoid apt pocket conflicts. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged implementation allowing architecture-specific stage-packages in snapcraft. The feature uses colon notation (package:arch) in the stage-packages list, chosen over per-part fields and slash syntax to prevent apt pocket conflicts. Tests passed. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1050 repo: add multiarch support for stage packages. | snapcraft | merged | Merged into master. Adds multiarch support for stage packages via the name:arch syntax, resolving LP #1655797. The author noted a simpler solution was proposed and reassigned the task, but the PR was ultimately merged. | |
| #3461 repo: account for arch & version when filtering stage packages | snapcraft | merged | Merged into master. Refactored stage package filtering to correctly handle architecture and version qualifiers via a new helper. Updated cross-compile tests, achieved 90.74% diff coverage, and passed CI after maintainer approval. | |
| #3080 repo: fix for multi-arch stage-package scenario | snapcraft | merged | Merged fix for multi-arch stage-package dependency resolution. Uses python-apt's or_dependencies to resolve architectures correctly, passes target_arch internally, and adds fallback logic. Approved and merged after test updates. | |
| #3416 repo: default to target arch for stage package cache | snapcraft | merged | Merged into master following approval and passing CI. The change defaults the stage package cache to the target architecture, updates 22 files, and adds spread tests to verify the behavior. | |
| #258 packages: fetch stage-packages from host arch's repo | craft-parts | merged | Merged to resolve cross-compilation failures by fetching stage-packages from the host architecture repository. Approved, passed CI, and closes LP #1983009 and CRAFT-1216. | |
| #1637282 Allow for architecture-specific stage packages | snapcraft (launchpad) | closed | The request for architecture-specific or optional stage packages was abandoned. No implementation or resolution was provided, and the issue closed after over nine years without activity. | |
| #3084 repo: fix for multi-arch virtual-packages | snapcraft | merged | Merged fix for multi-arch virtual package resolution. Correctly handles architecture tags, reverts or_dependencies to target_versions, and fixes an apt.Package.architectures method call. Approved and passed CI. | |
| #3740 repo: enable package repository architectures | snapcraft | merged | Merged into main. Enables package repository architectures by running dpkg --add-architecture for listed architectures, resolving Launchpad bug #1973213. Approved and passed CI with full coverage. | |
| #3459 repo: account for arch & version when filtering stage packages | snapcraft | closed | Superseded by PR #3461. Adjusts stage package filtering to account for architecture and version fields by moving the logic into a dedicated helper function. |