snapcraft
snapcraft copied to clipboard
Module error for snapcraft raised in override-build
Bug Description
Calling craftctl default
raises a ModuleNotFoundError
for snapcraft_legacy
To Reproduce
Run Snapcraft 8.3.1 with ansel from https://github.com/sergiusens/ansel/tree/core24
Environment
Ubuntu 22.04, Snapcraft 8.3.1 using the LXD provider
snapcraft.yaml
.
Relevant log output
2024-07-11 22:05:54.669 :: + snapcraftctl build
2024-07-11 22:05:54.686 :: Traceback (most recent call last):
2024-07-11 22:05:54.686 :: File "<string>", line 2, in <module>
2024-07-11 22:05:54.686 :: ModuleNotFoundError: No module named 'snapcraft_legacy'
2024-07-11 22:05:54.861 'override-build' in part 'ansel' failed with code 1.
2024-07-11 22:05:54.864 Traceback (most recent call last):
2024-07-11 22:05:54.864 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_application/services/lifecycle.py", line 261, in run
2024-07-11 22:05:54.864 aex.execute(action, stdout=stream, stderr=stream)
2024-07-11 22:05:54.864 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_parts/executor/executor.py", line 327, in execute
2024-07-11 22:05:54.864 self._executor.execute(actions, stdout=stdout, stderr=stderr)
2024-07-11 22:05:54.864 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_parts/executor/executor.py", line 137, in execute
2024-07-11 22:05:54.864 self._run_action(act, stdout=stdout, stderr=stderr)
2024-07-11 22:05:54.864 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_parts/executor/executor.py", line 214, in _run_action
2024-07-11 22:05:54.864 handler.run_action(action, stdout=stdout, stderr=stderr)
2024-07-11 22:05:54.864 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_parts/executor/part_handler.py", line 170, in run_action
2024-07-11 22:05:54.864 state = handler(step_info, stdout=stdout, stderr=stderr)
2024-07-11 22:05:54.864 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_parts/executor/part_handler.py", line 309, in _run_build
2024-07-11 22:05:54.865 self._run_step(
2024-07-11 22:05:54.865 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_parts/executor/part_handler.py", line 483, in _run_step
2024-07-11 22:05:54.865 step_handler.run_scriptlet(
2024-07-11 22:05:54.865 File "/snap/snapcraft/12136/lib/python3.10/site-packages/craft_parts/executor/step_handler.py", line 330, in run_scriptlet
2024-07-11 22:05:54.865 raise errors.ScriptletRunError(
2024-07-11 22:05:54.865 craft_parts.errors.ScriptletRunError: 'override-build' in part 'ansel' failed with code 1.
2024-07-11 22:05:54.865 Review the scriptlet and make sure it's correct.
2024-07-11 22:05:54.865 Recommended resolution: Review the scriptlet and make sure it's correct.
Additional context
No response