← Back to issue list

`base: core26` part conflict on `/lib`, `/bin` due to usrmerge

View original Github issue

Metadata

Project
snapcraft
Number
#6146
Type
issue
State
closed
Author
Saviq
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Fixed the core26 /bin and /lib part conflict caused by missing dpkg.list base-package cleanup metadata; the correction shipped to edge and was scheduled for Snapcraft 9.0.

Resolution: closed resolved

Reason: Base-files staging was not cleaned because core26 lacked /usr/share/snappy/dpkg.list. Maintainer @mr-cal confirmed the fix would be available on edge within hours and in Snapcraft 9.0 later that week.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description In `base: core26` builds, it's very easy to end up in a [UsrMerge](https://wiki.debian.org/UsrMerge) conflict between parts, e.g. if you want to install scripts into `/bin` in the snap. If any part ends up staging `base-files` (which most of them will), that will conflict as seen below, because in one part `/bin` is a symlink, and a folder in another. I can't make the [`{enable,disable}-usrmerge` `build-attribute`s](https://documentation.ubuntu.com/snapcraft/stable/reference/project-file/snapcraft-yaml/#parts.%3Cpart-name%3E.build-attributes) to help, either. The only way around this seems to be sprinkling `organize: { bin: usr/local/bin }` or so, anywhere you want to install an executable into a snap… but that's not pleasant to snapcrafters… Plugins are also affected and need `*-parameters` to redirect the install prefix. ### Steps to reproduce ```sh mkdir -p foo/bin snapcraft --verbose # with the yaml below ``` ### Environment Snapped, Ubuntu 25.10 ``` snapcraft 8.14.4.post81 ``` ### snapcraft.yaml ```yaml name: usrmerge-bug base: core26 build-base: devel version: '0.1' summary: usrmerge bug description: | usrmerge bug grade: devel confinement: devmode parts: whatever: plugin: nil stage-packages: - base-files my-part: plugin: dump source: foo ``` ### Log output ```shell Parts 'whatever' and 'my-part' list the following files, but with different contents or permissions: bin # or, with enable-usrmerge on "my-part": :: + cp --archive --link --no-dereference . /root/parts/my-part/install :: cp: cannot overwrite non-directory '/root/parts/my-part/install/./bin' with directory './bin' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed the core26 /bin and /lib part conflict caused by missing dpkg.list base-package cleanup metadata; the correction shipped to edge and was scheduled for Snapcraft 9.0.
stealth/space-bunny-alpha — closed resolved Fixed core26 usrmerge /bin and /lib part conflicts caused by a missing dpkg.list file; the correction shipped to edge and was scheduled for Snapcraft 9.0.
qwen/qwen3.6-35b-a3b — — Resolved part conflicts on /lib and /bin caused by usrmerge in core26 snaps. The bug resulted from a missing dpkg.list file that blocked base package cleanup. The fix is deployed to the edge channel and will ship in version 9.0.
qwen/qwen3.6-35b-a3b — — Fixed usrmerge conflicts in core26 snaps caused by /bin and /lib symlink clashes. Root cause was a missing dpkg.list file preventing base package cleanup. Resolved via PR #6148 and released on edge and in version 9.0.
qwen/qwen3.6-35b-a3b — — Resolved usrmerge conflicts on /lib and /bin by fixing missing base package cleanup caused by a missing dpkg.list file. The fix is on edge and ships in snapcraft 9.0.
qwen3.6-35b-a3b-mtp-q6 — — Fixed core26 part conflicts on /lib and /bin caused by usrmerge. The bug resulted from a missing dpkg.list file that prevented base package cleanup. The fix is deployed to edge and will release in version 9.0.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#6148 (confidence 90%)

    The maintainer linked the missing dpkg.list discovery to their investigation of unwanted core26 staged dependencies in #6148.

Related issues

Issue Project State Summary Similarity
#1934403 missing stage-packages does not account for /usr merge in core20 snapcraft (launchpad) closed Fixed by snapcore/snapcraft PR #3634 by resolving merged-/usr paths before the dpkg query; released in Snapcraft 6.1.
74%
#6148 Unwanted staged dependencies when building with a `core26` base snapcraft closed Fixed by craft-parts #1538 (49a8824c), adding Chisel manifest parsing for core26 package filtering; released on edge and scheduled for Snapcraft 9.0.
72%
#6248 core26 doesn't stage all dependencies of `stage-packages` snapcraft closed Not a Snapcraft bug: the missing stage-packages deps (libunbound8, libevent-2.1t64) came from a faulty chisel manifest in the core26 base, fixed upstream in canonical/core-base#443; issue closed.
71%
#6150 docs: use core26 as the default base snapcraft merged Merged #6150 in commit 9b6d7fa9a, documenting core26 as the default base, publishing Snapcraft 9 release notes, and standardizing core/base terminology.
71%