← Back to issue list

snapcraft clean fails on a clean directory

View original Launchpad issue

Metadata

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

Current evaluation

The missing parts-directory crash in #1497371 was closed without a documented fixing PR, commit, release, or maintainer explanation.

Resolution: closed stale

Reason: The Launchpad record has no comments or resolving change reference. With no evidence of a fix, rejection, or superseding work, the closure appears stale.

Evaluated by: mr-cal-bot

No scores available.

Issue body

$ ./../../bin/snapcraft clean Starting new HTTPS connection (1): wiki.ubuntu.com Cleaning up for part 'curl' Cleaning up for part 'main' Traceback (most recent call last): File "./../../bin/snapcraft", line 33, in <module> snapcraft.main.main() File "/home/elopio/workspace/canonical/snapcraft/trunk/snapcraft/main.py", line 80, in main args.func(args) File "/home/elopio/workspace/canonical/snapcraft/trunk/snapcraft/cmds.py", line 240, in clean if not os.listdir(common.get_partsdir()): FileNotFoundError: [Errno 2] No such file or directory: '/home/elopio/workspace/canonical/snapcraft/trunk/examples/downloader-with-wiki-parts/parts' To reproduce: bzr branch lp:snapcraft cd snapcraft/examples/downloader-with-wiki-parts ./../../bin/snapcraft clean

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale The missing parts-directory crash in #1497371 was closed without a documented fixing PR, commit, release, or maintainer explanation.
stealth/space-bunny-alpha — closed stale The clean command's missing-parts-directory crash was closed without a documented fix, PR, or release reference.
qwen/qwen3.6-35b-a3b — — Fixed a FileNotFoundError crash in snapcraft clean when executed on a fresh directory. The command now gracefully handles the absence of the parts directory instead of failing.
qwen/qwen3.6-35b-a3b — — Closed. The snapcraft clean command crashed with a FileNotFoundError when the parts directory was missing. Resolved by adding a directory existence check before listing contents.
qwen3.6-35b-a3b-mtp-q6 — — Fixed a FileNotFoundError crash when running snapcraft clean on a fresh directory by safely handling missing parts directories. The issue was closed after the fix was applied.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#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.
77%
#1690139 "snapcraft clean <part>" fails if the files I asked it to clean don't exist snapcraft (launchpad) closed Closed after a maintainer reported that `snapcraft clean` works as expected; no resolving PR or commit was cited.
76%
#1717413 snapcraft snap with an unexisting dir shows a traceback snapcraft (launchpad) closed Missing-directory handling was fixed to return a clear SnapcraftEnvironmentError instead of a traceback; Launchpad bug #1717413 is closed as Fixed.
73%
#1799925 snapcraft gives conflicting advice for cleaning parts snapcraft (launchpad) closed Auto-closed as stale after no activity; selected-part cleaning was enabled by canonical/snapcraft#2442 (commit 5546c3aab).
71%
#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.
71%
#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.
71%
#1591056 snapcraft clean <part> doesn't remove the bin/ directory snapcraft (launchpad) closed Reported that `snapcraft clean <part>` left an empty parts/<part>/bin dir behind. Maintainer confirmed fixed in master (via the pkg-config rework), verified the part dir is fully removed, and closed after the snapcraft.io tour was updated.
71%
#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.
71%
#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.
71%
#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.
71%