it is no longer possible to have a plainbox part with a python stage-package
Metadata
Current evaluation
Fixed by snapcore/snapcraft PR #1139 (commit c861ed976), which filters the conflicting sitecustomize file from plainbox-provider package trees.
Resolution: closed resolved
Reason: The Python plugin's sitecustomize rewrite exposed a collision with Ubuntu Python packages. Merged commit c861ed976 via PR #1139 made the plainbox-provider plugin filter out that file.
Evaluated by: mr-cal-bot
No scores available.
Issue body
It has never been possible to combine a python part that installs packages using the python install script, with a part that installs python packages from the ubuntu archive. This causes many conflicts.
However, on the plainbox plugin the install script is called with a prefix (python3 manage.py install --prefix=/providers/name), so this used to be doable without any conflicts. You could have a plainbox snap installing python dependencies from the archive.
This week, in order to support python snaps in classic [1], we introduced to the python plugin a rewrite to /etc/python3.5/sitecustomize.py. So now there is a new conflict that does affect the plainbox plugin. If it tries to install a python deb from the archive it will bring ubuntu's default /etc/python3.5/sitecustomize.py and the snap will fail.
To reproduce:
$ git clone https://github.com/snapcore/snapcraft /tmp/snapcraft
$ cd /tmp/snapcraft/integration_tests/snaps/plainbox-provider
Modify the snapcraft.yaml adding at the end:
stage-packages: [python3-petname]
$ /tmp/snapcraft/bin/snapcraft
Parts 'plainbox-local' and 'simple-plainbox-provider' have the followig file paths in common which have different contents:
etc/python3.5/sitecustomize.py
[1] https://github.com/snapcore/snapcraft/pull/1093/files
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft PR #1139 (commit c861ed976), which filters the conflicting sitecustomize file from plainbox-provider package trees. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed the plainbox-provider conflict by filtering staged sitecustomize.py in snapcraft PR #1139, merged as commit c861ed976. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #1139 (commit c861ed976): the plainbox-provider plugin now filters staged sitecustomize.py, preventing conflicts with Ubuntu Python packages. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR canonical/snapcraft#1139 (c861ed976): plainbox-provider now filters the conflicting sitecustomize.py, restoring compatibility with Python stage-packages. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The sitecustomize.py conflict between plainbox parts and python stage-packages was likely abandoned or superseded by newer snapcraft versions. No fix applied. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Reports a snapcraft file conflict when combining a plainbox part with a python stage-package due to sitecustomize.py rewrites. No fix was implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution, likely abandoned. The regression caused file conflicts when combining python parts with archive stage-packages due to a sitecustomize.py rewrite. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments or resolution. The python plugin conflict with plainbox stage-packages was abandoned and not addressed. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#1139
(confidence 100%)
Merged as commit c861ed976 to filter out sitecustomize.
-
Caused By:
snapcore/snapcraft#1093
(confidence 98%)
Its Python sitecustomize rewrite introduced the reported file collision.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1139 plainbox-provider plugin: filter out sitecustomize | snapcraft | merged | Merged in #1139 via c861ed976, filtering sitecustomize.py from plainbox-provider stage-packages to prevent conflicts and retain the plugin's functional copy (LP #1663792). |