"snapcraft clean <part>" fails if the files I asked it to clean don't exist
Metadata
Current evaluation
Closed after a maintainer reported that `snapcraft clean` works as expected; no resolving PR or commit was cited.
Resolution: closed not a bug
Reason: The closing evidence is a maintainer comment stating twice that `clean` works as expected now. No resolving PR, commit, or version was linked.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Steps to reproduce:
Make a directory and save attached snapcraft.yaml in it.
snapcraft
snapcraft clean pulseview
Expected result:
All build/stage/prime etc artifacts for the pulseview part are deleted.
Actual result:
al@al-desktop:~/Source/sigrok-snap-test$ snapcraft clean pulseview -s prime
"grade" property not specified: defaulting to "stable"
Cleaning priming area for pulseview
[Errno 2] No such file or directory: '/home/al/Source/sigrok-snap-test/prime/meta/gui/pulseview.desktop'
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: snapcraft 2.29
ProcVersionSignature: Ubuntu 4.4.0-77.98-generic 4.4.59
Uname: Linux 4.4.0-77-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu May 11 13:47:09 2017
InstallationDate: Installed on 2015-07-12 (669 days ago)
InstallationMedia: Xubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422.1)
PackageArchitecture: all
SourcePackage: snapcraft
UpgradeStatus: Upgraded to xenial on 2016-06-30 (315 days ago)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Closed after a maintainer reported that `snapcraft clean` works as expected; no resolving PR or commit was cited. | |
| stealth/space-bunny-alpha | — | closed resolved | Resolved in current Snapcraft: a maintainer confirmed that `clean` works as expected and closed the report; no fixing PR or release was identified. | |
| stealth/space-bunny-alpha | — | closed resolved | Clean now tolerates missing cleanup artifacts instead of aborting; commit 225217fc7 handles exceptions when cleaning a part in a fresh project. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. The snapcraft clean <part> FileNotFoundError for missing artifacts was fixed by adding graceful error handling to skip non-existent files during cleanup. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
15
Confidence:
95
Support Request:
5
|
close stale | snapcraft clean crashes when target files for a part do not exist. Issue is from 2017 with no activity and references EOL Ubuntu 16.04 and snapcraft 2.29. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
20
Confidence:
90
Support Request:
5
|
close stale | snapcraft clean <part> crashes with FileNotFoundError when requested files do not exist. Open since May 2017 with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
15
Confidence:
90
Support Request:
5
|
close stale | snapcraft clean <part> crashes with FileNotFoundError when target files are missing. Unreported since May 2017 with no maintainer response. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1497371 snapcraft clean fails on a clean directory | snapcraft (launchpad) | closed | The missing parts-directory crash in #1497371 was closed without a documented fixing PR, commit, release, or maintainer explanation. | |
| #1567054 Snapcraft clean doesn't remove pkg-config override | snapcraft (launchpad) | closed | Closed as unreproducible: the maintainer could not reproduce the reported `snapcraft clean` or `snapcraft clean <part-name>` behavior. | |
| #1615060 snapcraft clean is incomplete | snapcraft (launchpad) | closed | Reporter asked that `snapcraft clean` also delete built .snap files. Closed 2016-08-23 with no code change: maintainer @elopio stated leaving the .snap in place is by design, though he was mostly +1 on the request. | |
| #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. | |
| #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. | |
| #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). | |
| #1590811 "clean that part" advice doesn't tell you the command to use | snapcraft (launchpad) | closed | Fixed by merged snapcraft#1097 (commit edb56c9b8), which updated lifecycle output to print the command needed to clean a dirty part. |