-
Notifications
You must be signed in to change notification settings - Fork 3
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
Snapcraft-rocks fails when executing craftctl #33
Comments
tigarmo
added a commit
that referenced
this issue
May 9, 2024
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.
tigarmo
added a commit
that referenced
this issue
May 9, 2024
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.
tigarmo
added a commit
that referenced
this issue
May 9, 2024
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.
tigarmo
added a commit
that referenced
this issue
May 14, 2024
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.
tigarmo
added a commit
that referenced
this issue
May 14, 2024
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.
Coming from canonical/snapcraft#5079 (comment) -- this affects me as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An attempt to build https://github.com/cmatsuoka/mpg123-snap using Snapcraft-rocks 8_core22 failed with the following output:
The text was updated successfully, but these errors were encountered: