Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(merge): 'core22-7' into 'core22-8' #46

Open
wants to merge 4 commits into
base: core22-8
Choose a base branch
from

Conversation

tigarmo
Copy link
Collaborator

@tigarmo tigarmo commented May 14, 2024

No description provided.

tigarmo and others added 3 commits May 14, 2024 10:59
This fixes an issue where calling "craftctl" in a scriptlet would fail with a
ModuleNotFoundError for craft_parts. This happened when the snapcraft project
included build-packages that pulled in libpython3.10-minimal.

The reason that this failed is because in Rockcraft the `python` plugin (used
to build the `snapcraft` part) works by adding a custom "sitecustomize.py" in
`/usr/lib/python3.10/` to add the part's Python libraries to the Python path.
This is fine unless the `libpython3.10-minimal` package is explicitly installed
later on a container created from the rock, because that package has its own
sitecustomize.py file which overwrites Rockcraft's.

The solution is to make apt and dpkg aware that all of these Python-related
packages are already installed in the rock, by adding the dependency explicitly
as an `overlay-package`. This also has the extra beneficial side-effect of
improving installation of build-packages because dpkg/apt are aware of the
installed packages and don't have to download and re-install them unnecessarily.

Fixes #33.
@mr-cal mr-cal closed this Sep 5, 2024
@mr-cal mr-cal reopened this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants