← Back to issue list

stage-snap causes issues when mixing cores

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1849707
Type
issue
State
open
Author
~joeborg
Labels
—
Created
Updated
Closed
—

Current evaluation

Staging a core16 snap into core18 reportedly overwrote build tools and caused file collisions; the proposed mismatch warning is untriaged, and core18 support has since been removed.

Suggested action: needs triage

Reason: The report provides a concrete core16-to-core18 scenario, Python and Git failures, and a file-collision error, but has no maintainer triage beyond an external comment linking snapcraft-preload#38. Commit 40136ea9b removed core18 support while stage-snaps remain supported, so maintainers must first determine whether this still occurs between currently supported bases.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 11 Complexity: 45 Confidence: 80 Actionability: 58

Issue body

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://www.irccloud.com/pastebin/mxelP3CN/ gives errors like: ``` 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/x86_64-linux-gnu/libexpat.so.1 usr/bin/pdb3 usr/bin/py3clean usr/bin/py3compile usr/bin/pydoc3 usr/bin/pygettext3 usr/bin/python3 usr/bin/python3m usr/bin/run-mailcap usr/lib/valgrind/python3.supp usr/lib/x86_64-linux-gnu/libexpatw.so.1 usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 usr/lib/x86_64-linux-gnu/libmpdec.so.2.4.2 usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 usr/share/doc/libexpat1/changelog.Debian.gz usr/share/doc/libexpat1/copyright usr/share/doc/libffi6/changelog.Debian.gz usr/share/doc/libmpdec2/changelog.Debian.gz usr/share/doc/libpython3-stdlib/README.Debian usr/share/doc/libpython3-stdlib/changelog.Debian.gz usr/share/doc/libsqlite3-0/changelog.Debian.gz usr/share/doc/mime-support/changelog.gz usr/share/doc/python3-minimal/README.Debian usr/share/doc/python3-minimal/changelog.Debian.gz usr/share/man/man1/pdb3.1.gz usr/share/man/man1/pydoc3.1.gz usr/share/man/man1/pygettext3.1.gz usr/share/man/man1/python3.1.gz usr/share/man/man1/python3m.1.gz usr/share/man/man1/run-mailcap.1.gz usr/share/pixmaps/python3.xpm usr/share/python3/debian_defaults usr/share/python3/debpython/version.py usr/share/python3/py3versions.py 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.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 11
Complexity: 45
Confidence: 80
Actionability: 58
needs triage Staging a core16 snap into core18 reportedly overwrote build tools and caused file collisions; the proposed mismatch warning is untriaged, and core18 support has since been removed.
stealth/space-bunny-alpha
Impact: 55
Quick Win: 18
Complexity: 52
Confidence: 83
Actionability: 67
needs triage Staging a core16 snap into core18 can overwrite build tools or cause file collisions; a core-mismatch warning is proposed, but the report remains untriaged.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 14
Complexity: 38
Confidence: 90
Actionability: 72
needs triage Stage-snaps from another core can overwrite the build environment or collide with other parts. A core-mismatch warning is proposed, but the report remains untriaged.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 19
Staleness: 95
Complexity: 45
Confidence: 65
Support Request: 25
close stale stage-snap staging a core16 snap into a core18 build overwrites the build environment and triggers file conflicts; reporter proposes a warning on core mismatch. No maintainer activity in ~6.8 years; core16/core18 are EOL.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 90
Support Request: 25
close stale Build environment corruption and file conflicts occur when staging core16 into core18 snaps. Reporter proposes a warning for core mismatches. No maintainer activity in over six years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 10
close stale Snapcraft stage-snap fails when mixing core16 and core18 bases due to environment overwrites and file conflicts. Author suggests adding a warning for core mismatches. Unaddressed for over 6 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 35
Confidence: 90
Support Request: 20
close stale Reported build environment conflicts and file collisions when staging core16 snaps into core18 environments in snapcraft. No maintainer response or labels after over six years.

Update history

Date Change
created

Related work

  • Related To: snapcraft-preload#38 (confidence 75%)

    A commenter explicitly identified it as having the same suspected root cause.

Related issues

Issue Project State Summary Similarity
#2009520 core18/20: inconsistent architecture parsing snapcraft (launchpad) closed Superseded by snapcore/snapcraft#4340 and #4341. Core22+ overlapping build-on handling merged in #3821 (4876b53); core20 support was declined.
73%
#1885074 stage-packages behaviour inconsistent snapcraft (launchpad) open Snapcraft 4.0.7 reportedly creates an empty core18 arm64 snap when stage-packages use :arm64 suffixes natively, while cross-compilation succeeds; no triage or resolution is recorded.
72%
#1918705 `stage-snaps: mir-kiosk-x11` segfaults on `base: core18` snapcraft (launchpad) closed Closed as stale after the core18/core20 stage-snaps switch could not be reproduced; no reproducer or fixing PR or commit was supplied.
71%