← Back to issue list

repo: account for arch & version when filtering stage packages

View original Github issue

Metadata

Project
snapcraft
Number
#3461
Type
pull request
State
merged
Author
cjp256
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

The filter should only contain package names, not including the optional [:arch] or [=version] fields. (1) Move the filter/no-filter logic out of apt_cache and introduce a _get_filtered_stage_packages() helper in _deb to handle the processing. Use newly introduced DebPackage to ensure consistency, and do the same for get_packages_in_base(). (2) Update cross-compile spread test to incorporate the various grammars. Depends on #3460

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Refactored stage package filtering to correctly handle architecture and version specifiers using a new helper and DebPackage. Updated cross-compile spread tests to cover various grammars.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Refactored stage package filtering to correctly parse architecture and version specifiers by extracting logic into helper functions and updating cross-compile tests. Increased code coverage by 0.02%.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
85%
#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.
76%
#876 repo: allow for architecture-specific stage-packages snapcraft merged 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.
76%
#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.
73%
#3496 Revert "repo: account for arch & version when filtering stage packages (#3461)" snapcraft closed Closed to revert commit 0bf7a2e6619b0037a50caeb49d28788c021d0921, undoing architecture and version filtering for stage packages.
72%
#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.
72%
#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.
72%
#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.
71%
#1157 repo: support versioned stage-packages snapcraft merged Support for versioned stage-packages was successfully merged after approval from two reviewers. The contributor addressed feedback and resolved a local CLA issue, delivering a +94/-8 line change across four files.
71%