"snapcraft clean <part>" fails if the files I asked it to clean don't exist
Metadata
Current evaluation
Closed. The snapcraft clean <part> FileNotFoundError for missing artifacts was fixed by adding graceful error handling to skip non-existent files during cleanup.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
15
Confidence:
90
Support Request:
5
|
close stale | snapcraft clean <part> crashes with FileNotFoundError when attempting to remove non-existent artifacts. The command should gracefully handle missing files. Issue remains open with no recent activity or assigned developers. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1497371 snapcraft clean fails on a clean directory | snapcraft (launchpad) | closed | 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. | |
| #1799925 snapcraft gives conflicting advice for cleaning parts | snapcraft (launchpad) | closed | Closed without a fix. Snapcraft incorrectly advised running snapcraft clean with part and step flags, which were unsupported. The author worked around it with a full clean. The report appears abandoned or superseded by later updates. | |
| #1615060 snapcraft clean is incomplete | snapcraft (launchpad) | closed | Reporting that snapcraft clean skips local .snap files was closed without comments or resolution, indicating the report was abandoned or left unresolved. |