← Back to issue list

snapcraft cleanbuild --debug should provide guidance on build failure

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1746359
Type
issue
State
closed
Author
~ev
Labels
—
Created
Updated
Closed

Current evaluation

Superseded by Snapcraft 3.x base-based build environments, which replaced the legacy cleanbuild --debug container workflow.

Resolution: closed superseded

Reason: Maintainer Sergiusens closed the issue as superseded by build environments in 3.x using bases. The requested legacy-container guidance was therefore not implemented.

Evaluated by: mr-cal-bot

No scores available.

Issue body

If I snapcraft cleanbuild --debug and the build fails, I'm dumped into a shell. I can then cd into build_*, fix up my snap, and run snapcraft again. This will produce a working snap. If I now ctrl-D out of the shell, the container will be destroyed along with my working snap. I think snapcraft cleanbuild --debug on failure should display a message along these lines just before the shell prompt: The snapcraft build failed. Dropping you into a shell within the container. You can modify files in build_yourapp/ and re-run snapcraft. Note that exiting this shell will terminate the container and abandon your changes. You can copy files out using <instructions>.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Superseded by Snapcraft 3.x base-based build environments, which replaced the legacy cleanbuild --debug container workflow.
stealth/space-bunny-alpha — closed superseded Superseded by Snapcraft 3.x base-based build environments; the legacy cleanbuild --debug container workflow was replaced before the proposed guidance was implemented.
stealth/space-bunny-alpha — closed superseded Superseded by Snapcraft 3.x base-based build environments, which replaced legacy cleanbuild --debug containers; the requested guidance was not implemented.
stealth/space-bunny-alpha — closed superseded Superseded in Snapcraft 3.x when base-based build environments replaced legacy cleanbuild --debug containers; the requested warning was not implemented.
stealth/space-bunny-alpha — closed stale Request to warn users that exiting cleanbuild --debug destroys container changes was closed without implementation; no resolving PR or commit was recorded.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The request to add a build failure warning to snapcraft cleanbuild --debug was abandoned. No resolution or merge details were recorded.
qwen/qwen3.6-35b-a3b — — Closed as abandoned due to inactivity. The requested debug shell guidance for snapcraft cleanbuild was never implemented.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The request for debug shell guidance was abandoned due to inactivity and the subsequent deprecation of the cleanbuild command in Snapcraft.
qwen3.6-35b-a3b-mtp-q6 — — Closed as abandoned due to prolonged inactivity. The requested debug shell guidance was never implemented and is likely superseded by snapcraft's architectural changes and cleanbuild deprecation.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1609803 snapcraft cleanbuild --no-clean-up snapcraft (launchpad) closed Cleanbuild debugging landed in snapcore/snapcraft PR #740 (commit a24083e75); follow-up PR #1404 made --debug enter a shell when builds fail.
83%
#1697979 snapcraft fails on initial cleanbuild probe snapcraft (launchpad) closed Closed as obsolete: cleanbuild was decommissioned, and standard Snapcraft builds now transparently use a clean build environment.
80%
#1816042 snapcraft cleanbuild fails if container isn't fully ready snapcraft (launchpad) closed Closed as obsolete: @sergiusens said cleanbuild was no longer supported because normal builds now transparently provide clean builds.
75%
#1808800 snapcraft clean does not work inside snapcraft --debug snapcraft (launchpad) closed The managed-host failure in snapcraft clean inside snapcraft --debug was already fixed in an earlier release; maintainer confirmation was added on 2020-08-24.
75%
#1800119 snapcraft cleanbuild snapcraft (launchpad) closed The obsolete cleanbuild command was retired because builds became clean by default; a maintainer closed the report in August 2023.
75%
#1570706 Snapcraft cleanbuild command doesn't work snapcraft (launchpad) closed Fixed by merged canonical/snapcraft PR #458 (f78b1e3a3), which corrected Cleanbuilder constructor arguments so snapcraft cleanbuild could initialize its container.
74%
#1746381 snapcraft cleanbuild shouldn't always delete container at end snapcraft (launchpad) closed No fix was made: maintainers confirmed cleanbuild containers were disposable, recommended SNAPCRAFT_CONTAINER_BUILDS, and left the request for default failure shells unimplemented.
74%
#2044389 snapcraft clean failed but exit 0 snapcraft (launchpad) open Snapcraft 7.5.3 reports a missing build environment during clean but exits 0; a maintainer confirmed the bug and agreed it should fail, with no fix recorded.
73%
#1811208 snapcraft failed to build with cleanbuild on 18.04 snapcraft (launchpad) closed Expired after 60 days without activity; no fix was recorded. A maintainer advised using --destructive-mode because cross-compilation in build environments was unsupported.
73%
#1675516 can't cleanbuild snapcraft itself snapcraft (launchpad) closed Fresh testing confirmed Snapcraft could build itself successfully; the report was closed after the suspected interim fix was verified.
70%