← Back to issue list

project: use correct host arch when target arch is set

View original Github issue

Metadata

Project
snapcraft
Number
#3831
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged as commit 33088d59d: Project now tracks host Debian architecture separately, so --target-arch no longer overwrites it.

Resolution: closed resolved

Reason: PR #3831 was merged as commit 33088d59d, adding a dedicated host Debian architecture property and preventing --target-arch from replacing the host architecture.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The deb arch in project configuration is set to the target architecture when --target-arch is used. Create a new project property holding the host deb architecture instead of obtaining it from freshly instantiated project options to avoid problems later when converting `ProjectOptions` to a singleton. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint`? - [ ] Have you successfully run `pytest tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as commit 33088d59d: Project now tracks host Debian architecture separately, so --target-arch no longer overwrites it.
stealth/space-bunny-alpha — closed resolved Merged PR #3831 as commit 33088d59d, adding a separate host DEB architecture so --target-arch no longer overwrites host architecture detection.
stealth/space-bunny-alpha — closed resolved Merged in PR #3831 as commit 33088d59d, adding a separate host DEB architecture so --target-arch no longer overwrites it.
stealth/space-bunny-alpha — closed resolved Merged PR #3831 (commit 33088d59d) to preserve the host Debian architecture when --target-arch sets a different project architecture, avoiding later ProjectOptions singleton conversion issues.
qwen/qwen3.6-35b-a3b — — Merged a fix introducing a dedicated property to store the host deb architecture. This prevents incorrect architecture assignment when --target-arch is specified, resolving singleton conversion issues.
qwen3.6-35b-a3b-mtp-q6 — — Merged into hotfix/7.0.11. Adds a dedicated project property to correctly track host deb architecture when --target-arch is set, preventing singleton conversion conflicts and resolving architecture detection bugs.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#1204 (confidence 95%)

    Earlier merged change decoupled target architecture from Debian architecture and is directly related to this cross-architecture fix.

Related issues

Issue Project State Summary Similarity
#1204 target-arch: decouple target arch from deb, and use a separate field … snapcraft merged Merged #1204 into master, decoupling target architecture from Debian architecture and adding a separate target field with architecture aliases for matching.
74%
#1857 grammar: make on statement work with host arch snapcraft merged Merged as b451f48fc: package selectors now distinguish host architecture with on, target architecture with to, and combined on-to cases.
71%
#3006 repo: always use host release and arch for Ubuntu snapcraft merged Merged PR #3006 (7045361ef): Ubuntu package sources now use the host release and architecture, queried separately; the ProjectOptions dependency and tests were updated.
71%
#3418 project: always set target arch even if not cross compiling snapcraft merged Merged PR #3418 in commit a05e64594, setting an explicit target architecture for native and cross builds and consistently defining SNAPCRAFT_TARGET_ARCH.
70%