Snapcraft includes files from installed snaps in new snap
Metadata
Current evaluation
Fixed by excluding /snap/ paths from crawled dependencies in snapcore/snapcraft PR #1231 (commit 0e9b5a84e).
Resolution: closed resolved
Reason: PR #1231 changed library discovery to exclude dependencies under /snap/, preventing files from installed snaps such as conjure-up and core from being included. The change was merged as commit 0e9b5a84e.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I was very surprised to see these files in a new snap I just made:
squashfs-root/snap
squashfs-root/snap/conjure-up
squashfs-root/snap/conjure-up/108
squashfs-root/snap/conjure-up/108/usr
squashfs-root/snap/conjure-up/108/usr/lib
squashfs-root/snap/conjure-up/108/usr/lib/x86_64-linux-gnu
squashfs-root/snap/conjure-up/108/usr/lib/x86_64-linux-gnu/libdb-5.3.so
squashfs-root/snap/core
squashfs-root/snap/core/current
squashfs-root/snap/core/current/usr
squashfs-root/snap/core/current/usr/lib
squashfs-root/snap/core/current/usr/lib/x86_64-linux-gnu
squashfs-root/snap/core/current/usr/lib/x86_64-linux-gnu/libnl-route-3.so.200
I can't think of any good reason for those files to be there. Conjure-up is not a dependency of this new snap in any way.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by excluding /snap/ paths from crawled dependencies in snapcore/snapcraft PR #1231 (commit 0e9b5a84e). | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed classic-confinement library discovery so dependencies under installed snaps’ /snap paths are excluded; merged in snapcraft PR #1231 as 0e9b5a84e. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by canonical/snapcraft#1231 (commit 0e9b5a84e), which excludes /snap/ from library discovery so files from installed snaps are not packaged. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned due to inactivity. Snapcraft incorrectly bundled files from previously installed snaps into new builds, but no fix or follow-up was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Snapcraft incorrectly bundled files from other installed snaps into new builds. The report received no comments or fixes and was abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and abandoned due to inactivity. The reported bug of Snapcraft incorrectly bundling files from unrelated installed snaps received no comments or resolution. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Abandoned. Snapcraft was reported to incorrectly bundle files from previously installed snaps into new builds, but received no comments or resolution. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#1231
(confidence 99%)
The resolving PR excludes /snap/ paths from library dependency crawling and was recorded as merged commit 0e9b5a84e.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1548232 Snapcraft messes with include path precedence in unhealthy ways | snapcraft (launchpad) | closed | Include-path precedence was corrected by pkg-config work in canonical/snapcraft#429 (commit a117bd273), with a regression test added. | |
| #1778081 Snapcraft saves the fact that parts need to be rebuilt rather than discovering them | snapcraft (launchpad) | closed | Fixed by snapcore/snapcraft PR #2165, replacing persisted dependency-dirty state with dependency rebuild discovery. | |
| #1573349 snapcraft examples are starting the binaries from outdated path | snapcraft (launchpad) | closed | Fixed by merged PR ubuntu-core/snapcraft#484 (commit 581e02ba2) updating example tests to use /snap/bin instead of /snaps/bin; shipped in snapcraft 2.8.8b. | |
| #1575628 Snapcraft doesn't ignore already-built snaps when `source` is the folder containing the `snapcraft.yaml` | snapcraft (launchpad) | closed | Snapcraft now filters *.snap files from sourcedir, preventing rebuilt artifacts from being copied into part build directories; shipped in version 2.10.1. | |
| #1719928 snapcraft update won't fetch from SNAPCRAFT_PARTS_URI | snapcraft (launchpad) | closed | Fixed by snapcore/snapcraft PR #1856, which keyed cached parts data by SNAPCRAFT_PARTS_URI so alternate part sources were no longer treated as already current. |