snapcraft-coverage fails with 'No module named 'snapcraft.dirs'
Metadata
Current evaluation
Fixed the snapcraft-coverage script by removing the deprecated snapcraft.dirs import, resolving the ImportError and aligning it with the main snapcraft build. Closed as resolved.
Suggested action: —
No scores available.
Issue body
We have a duplicate script that does the same that snapcraft does, but in addition records coverage.
The snapcraft script was updated to get rid of the dirs module, but the coverage script was not.
Traceback (most recent call last):
File "/home/jenkins-slave/workspace/github-snapcraft-examples-tests-cloud/bin/snapcraft-coverage", line 31, in <module>
import snapcraft.dirs
ImportError: No module named 'snapcraft.dirs'
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Fixed the snapcraft-coverage script by removing the deprecated snapcraft.dirs import, resolving the ImportError and aligning it with the main snapcraft build. Closed as resolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by updating the snapcraft-coverage script to remove the deprecated snapcraft.dirs import, resolving the ImportError. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1601 snapcraft.yaml: don't re-use build dir | snapcraft | merged | Merged a fix for a source-build directory clash in snapcraft.yaml. The build directory was renamed to apt-build to avoid scriptlet conflicts. Approved by reviewers and passed CI, resolving the failure. | |
| #1573349 snapcraft examples are starting the binaries from outdated path | snapcraft (launchpad) | closed | Updated snapcraft example paths from /snaps/bin to /snap/bin to resolve failing tests. The fix was verified and the issue closed. |