← Back to issue list

Pack command errors ugly

View original Github issue

Metadata

Project
craft-application
Number
#705
Type
issue
State
closed
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Closed without a fix. Deferred to internal Jira ticket CRAFT-4420. The unhandled RuntimeError for invalid platform builds remains unresolved.

Suggested action:

No scores available.

Issue body

### Bug Description The pack command errors in an ugly way when there are no valid platforms. ### To Reproduce see below ### part yaml ```shell ``` ### Relevant log output ```shell 2025-03-27 15:47:45 Error executing google:ubuntu-24.04-64:tests/spread/core24/platforms:build_for_no_match (mar271510-010725) : ----- + cd ./snaps/build-for-no-match + [[ -e expected-failure.txt ]] + call_args= + [[ -e arguments.txt ]] ++ cat arguments.txt + call_args='--build-for armhf' + env_vars= + [[ -e environmental-variables.txt ]] + eval snapcraft pack --destructive-mode --build-for armhf + MATCH -f expected-failure.txt grep error: pattern not found, got: ++ snapcraft pack --destructive-mode --build-for armhf snapcraft internal error: RuntimeError('Cannot generate a project that builds on amd64 and builds for armhf') Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20250327-154744.732845.log' Traceback (most recent call last): File "/snap/snapcraft/x1/bin/snapcraft", line 8, in <module> sys.exit(main()) ^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 462, in main return app.run() ^^^^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 613, in run return_code = self._run_inner() ^^^^^^^^^^^^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/snapcraft/application.py", line 174, in _run_inner return_code = super()._run_inner() ^^^^^^^^^^^^^^^^^^^^ File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 579, in _run_inner project_service.configure(platform=platform, build_for=build_for) File "/snap/snapcraft/x1/lib/python3.12/site-packages/craft_application/services/project.py", line 100, in configure raise RuntimeError( RuntimeError: Cannot generate a project that builds on amd64 and builds for armhf ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without a fix. Deferred to internal Jira ticket CRAFT-4420. The unhandled RuntimeError for invalid platform builds remains unresolved.
qwen/qwen3.6-35b-a3b Closed without a public resolution. The issue was deferred to internal tracking ticket CRAFT-4420 to address the raw traceback and unhandled RuntimeError thrown by the pack command during platform mismatches.
qwen/qwen3.6-35b-a3b Closed. Tracked internally via Jira ticket CRAFT-4420 to address the unhelpful RuntimeError from snapcraft pack during platform mismatches. No public fix or resolution details were provided.
qwen3.6-35b-a3b-mtp-q6 Closed without a public fix. The report detailed a raw Python traceback when snapcraft pack encounters platform mismatches. An internal Jira ticket was created, but no code changes were merged or documented.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#693 craft-platforms errors aren't caught craft-application closed Closed without a code fix; tracking moved to Jira CRAFT-4371.
72%
#941 Platform names should not be allowed to contain `/` characters craft-application closed Closed without a direct fix. The platform name slash character bug causing packing failures was tracked externally via Jira ticket CRAFT-4876. No pull requests or code changes were merged to resolve the issue.
71%