← Back to issue list

snapcraft pack error obtuse on snapd errors

View original Github issue

Metadata

Project
snapcraft
Number
#4870
Type
issue
State
closed
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Closed as a duplicate of #4548, which was tracked by #4499; hidden snapd pack diagnostics were fixed by merged PR #5188 (a9fc44093).

Resolution: closed superseded

Reason: Maintainer mr-cal closed it as a duplicate of #4548 after confirming the behavior also affected core22. The underlying problem was fixed by PR #5188, commit a9fc44093, which surfaced snapd stderr from failed pack commands.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description The messages are being hidden from snap pack, this seems to be a core24 regression ### To Reproduce pack a snap on core24 with a command to a path that does not exist ### Environment core24 ### snapcraft.yaml ```shell name: apostrophe base: core24 adopt-info: apostrophe grade: devel confinement: devmode apps: apostrophe: command: bin/apostrophe extensions: [gnome] build-packages: - pandoc parts: apostrophe: source: https://gitlab.gnome.org/World/apostrophe.git plugin: meson meson-parameters: - --prefix=/usr parse-info: - usr/share/metainfo/org.gnome.gitlab.somas.Apostrophe.metainfo.xml after: - revealjs revealjs: source: https://github.com/hakimel/reveal.js/archive/refs/tags/5.1.0.tar.gz plugin: dump organize: "*": usr/share/apostrophe/libs/reveal.js/ ``` ### Relevant log output ```shell Command '['snap', 'pack', '--filename', 'apostrophe_3.0_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1. snapcraft-apostrophe-on-amd64-for-amd64-21764214 ../project# cat ../prime/meta/snap.yaml ``` ### Additional context Manual snap pack on the prime dir ``` 2024/06/23 12:32:30.262115 container.go:393: in snap "apostrophe": path "bin/apostrophe" does not exist 2024/06/23 12:32:30.262192 container.go:393: in snap "apostrophe": path "bin" does not exist error: cannot pack "../prime": snap is unusable due to missing files ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Closed as a duplicate of #4548, which was tracked by #4499; hidden snapd pack diagnostics were fixed by merged PR #5188 (a9fc44093).
stealth/space-bunny-alpha — closed superseded Closed as a duplicate of #4548; its resolution was tracked in #4499 and fixed by snapd 2.66 exposing snap pack stderr.
qwen/qwen3.6-35b-a3b — — Closed as a duplicate of issue #4548. The snapcraft pack error handling regression affecting core22 and core24 is superseded by the referenced tracking issue.
qwen/qwen3.6-35b-a3b — — Closed as a duplicate of issue #4548. The snapcraft pack command obscures snapd errors regarding missing paths on core22 and core24. Tracking moved to the referenced issue.
qwen/qwen3.6-35b-a3b — — Closed as a duplicate of issue #4548. The obtuse snapd error handling during snapcraft pack affects core22 and core24, with the underlying fix tracked in the referenced issue.
qwen3.6-35b-a3b-mtp-q6 — — Closed as a duplicate of issue #4548. The snapcraft pack error handling issue is tracked there and also affects core22.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: snapcraft#4548 (confidence 100%)

    The closing maintainer comment explicitly identified this report as a duplicate.

  • Duplicate Of: snapcraft#4499 (confidence 100%)

    Issue #4548 was itself consolidated under the earlier report for hidden snap pack errors.

  • Likely Fixed By: snapcraft#5188 (confidence 100%)

    Merged as commit a9fc44093; it exposed snapd's error output when snap pack failed.

Related issues

Issue Project State Summary Similarity
#4923 Increase verbosity of `snapcraft`'s missing files error snapcraft closed Closed as a duplicate of #4499; suppressed `snap pack` errors were fixed by merged PR #5188 (commit a9fc44093), which surfaced snapd's stderr.
79%
#4548 Make `snap pack ...` errors also return the problem instead of just the error code snapcraft closed Closed by mr-cal as a duplicate of #4499 (tracked as CRAFT-2559); that issue was fixed by merged PR #5188 (commit a9fc44093), which surfaces snapd's error output when `snap pack` fails.
78%
#5188 fix: improve error message from snapd pack snapcraft merged Merged PR #5188 in commit a9fc44093, improving snapd pack failures by surfacing snapd's error output and fixing snapcraft#4499.
74%
#4880 snapcraft indiscriminately removes *.snap files snapcraft closed Closed as an upstream snap pack issue, not a Snapcraft bug; the omission was reproduced with `snap pack` alone and the reporter was redirected to snapd.
74%
#4933 bug: snapcraft prints insufficient logging when using lxd snapcraft closed Closed as a duplicate of #4499, which was fixed by merged PR #5188 (commit a9fc44093) to surface snapd's snap pack stderr after snapd 2.66 added support.
72%
#2075311 snap pack returned non-zero exit status 20 snapcraft (launchpad) open Snapcraft exposed snap pack failures as an opaque exit-status exception; current code reports the underlying snapd error instead, resolving the reported diagnostic problem.
72%
#53 Use `snapcraft pack` for snapcraft >=8 craft-actions closed Closed without a documented implementation; only an automated CRAFT-5028 ticket comment was posted, and no resolving PR or commit was identified.
70%