← Back to issue list

snapcraft-coverage fails with 'No module named 'snapcraft.dirs'

View original Launchpad issue

Metadata

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

Current evaluation

Fixed by merged PR #471, which updated snapcraft-coverage to use Snapcraft's internal directories; landed in commit 94acd7133.

Resolution: closed resolved

Reason: PR #471 was merged and replaced the broken snapcraft.dirs dependency in snapcraft-coverage; commit 94acd7133 records the fix.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #471, which updated snapcraft-coverage to use Snapcraft's internal directories; landed in commit 94acd7133.
stealth/space-bunny-alpha — closed resolved snapcraft-coverage was updated to use Snapcraft’s internal directories module; PR #471 merged as commit 94acd7133.
stealth/space-bunny-alpha — closed resolved snapcraft-coverage was fixed to use Snapcraft's internal directory helpers after snapcraft.dirs was removed, via PR #471 (commit 94acd7133).
stealth/space-bunny-alpha — closed resolved Fixed by snapcraft#471 (commit 94acd7133), updating snapcraft-coverage to use Snapcraft's internal directory helpers after snapcraft.dirs was removed.
stealth/space-bunny-alpha — closed resolved Fixed by canonical/snapcraft PR #471 (94acd7133), updating snapcraft-coverage to use internal directories after snapcraft.dirs was removed.
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

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#471 (confidence 100%)

    Merged PR #471 updated the coverage script after snapcraft.dirs was removed.

Related issues

Issue Project State Summary Similarity
#471 Update the snapcraft-coverage script to use the internal dirs snapcraft merged Merged #471, updating snapcraft-coverage to use internal directories; landed in commit 94acd7133.
80%
#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.
71%
#1849 tests: add snap not found tests snapcraft merged Merged missing-snap test coverage; snapcraft PR #1849 landed as commit 54cf2bd9e.
70%