stage-snap causes issues when mixing cores
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
I came across this issue whilst trying to stage a core16 snap into a core18.
It seems that, when mixing these cores, your build environment (during snapcraft build) is overwritten by the unpacking of the incoming stage snap. This obviously breaks build packages that you have. E.g. this yaml https:/
```
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
```
```
fatal: unable to find remote helper for 'https
```
Even if you put this stage snap to the bottom of the build process, you will end up with an error like:
```
Failed to stage: Parts 'aws-cli' and 'docker' have the following files, but with different contents:
etc/mime.types
lib/
usr/bin/pdb3
usr/
usr/
usr/bin/pydoc3
usr/
usr/bin/python3
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
usr/
Snapcraft offers some capabilities to solve this by use of the following keywords:
- `filesets`
- `stage`
- `snap`
- `organize`
To learn more about these part keywords, run `snapcraft help plugins`.
```
I propose that snapcraft gives a warning when pulling in the snap to be staged if the cores mismatch.
summary: |
- stage-snap casuses issues when mixing cores + stage-snap causes issues when mixing cores |
If I were to guess, I'd say that this is effectively the same root cause as https:/ /github. com/sergiusens/ snapcraft- preload/ issues/ 38