← Back to issue list

fix(legacy): accept --build-for on long-form architecture remote build

View original Github issue

Metadata

Project
snapcraft
Number
#5819
Type
pull request
State
closed
Author
bepri
Labels
Created
Updated
Closed

Current evaluation

Superseded by PR #6090. This PR attempted to fix legacy remote build handling of the --build-for flag with long-form architectures. Testing revealed it still failed, so the maintainer closed it in favor of a newer fix.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [ ] Have you successfully run `make test`? --- Changes the behavior of the legacy remote builder to accept `--build-for` when using the long-form architecture notation. The issue was that for the long-form, architectures were decoded from the project, and then an error would be raised even if `--build-for` narrowed the project to a valid subset of architectures. Now, `--build-for` is given priority and an error is only raised if the selected platforms aren't a subset of the available ones. I know that the error message says `--build-on`, both flags had this issue and I don't see a way to raise a more generic error message with click - it seems to only allow raising for a single bad flag usage. Fixes #5817.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Superseded by PR #6090. This PR attempted to fix legacy remote build handling of the --build-for flag with long-form architectures. Testing revealed it still failed, so the maintainer closed it in favor of a newer fix.
qwen3.6-35b-a3b-mtp-q6 Fixes --build-for handling with long-form architecture notation in the legacy remote builder. Testing revealed the change did not resolve the error. The pull request was closed and superseded by #6090.
qwen3.6-35b-a3b-mtp-q6 Attempted fix for --build-for handling with long-form architectures in the legacy remote builder failed testing. The change was closed and superseded by pull request #6090.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#6090 feat(remote-build/legacy): improve error when building with --build-for snapcraft merged Merged improvement to legacy remote builder error messaging for --build-for. Clarifies that --build-on is unsupported and provides actionable guidance, resolving #5817 and superseding #5819.
76%
#5817 Unclear remote build error with ``--build-for`` on core20 snapcraft open core20 remote-build with --build-for and long-form architectures emits a misleading --build-on error. Triaged by maintainers as a likely legacy limitation; addressed in 8.14.4 via PR #6090 which improved the error message.
74%
#4495 remote build: odd errors for certain `architectures:` setups snapcraft closed Remote build architecture validation errors and misleading logs were fixed via remote-builder improvements and PR 4994. Conflicting build-for flags now yield a user-friendly error, and Launchpad reporting was corrected. Closed.
70%
#3919 cli: move remote build out of legacy snapcraft merged Merged into main as PR #3919. Moved CLI remote build logic out of legacy, exported --build-for, hidden --build-on, and fixed emitter stopping during prompts. Approved and passed CI checks.
70%