← Back to issue list

missing stage-packages does not account for /usr merge in core20

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1934403
Type
issue
State
closed
Author
~sergiusens
Labels
craft-422
Created
Updated
Closed

Current evaluation

Fixed by snapcore/snapcraft PR #3634 by resolving merged-/usr paths before the dpkg query; released in Snapcraft 6.1.

Resolution: closed resolved

Reason: A maintainer linked PR #3634 as the fix and later confirmed that the change was released in Snapcraft 6.1.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The query is done against the merged path and not the path dpkg is aware of # ldd /usr/bin/lspci | grep libpci libpci.so.3 => /lib/x86_64-linux-gnu/libpci.so.3 (0x00007fbc5e485000) # dpkg -S /lib/x86_64-linux-gnu/libpci.so.3 dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpci.so.3 # dpkg -S /usr/lib/x86_64-linux-gnu/libpci.so.3 libpci3:amd64: /usr/lib/x86_64-linux-gnu/libpci.so.3 # ls -ld /lib lrwxrwxrwx 1 root root 7 Jun 23 07:13 /lib -> usr/lib An option would be to resolve the path before doing the query # dpkg -S $(realpath /lib/x86_64-linux-gnu/libpci.so.3) libpci3:amd64: /usr/lib/x86_64-linux-gnu/libpci.so.3.6.4

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by snapcore/snapcraft PR #3634 by resolving merged-/usr paths before the dpkg query; released in Snapcraft 6.1.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR canonical/snapcraft#3634 (commit e22895fa0); a maintainer confirmed the change shipped in Snapcraft 6.1.
stealth/space-bunny-alpha — closed stale Closed without a documented resolution of the core20 /usr-merge stage-packages lookup problem; no resolving PR or commit could be identified.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The report details stage-packages failing to resolve core20 /usr merge symlinks during dpkg queries. The suggested fix is to realpath paths before querying, but no implementation was provided.
qwen/qwen3.6-35b-a3b — — Abandoned. The stage-packages query fails on /usr merged paths in core20 because dpkg queries symlinked paths instead of real paths. The suggested path resolution fix was never implemented.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The stage-packages query fails on core20 because dpkg queries symlinked /lib instead of /usr/lib. The suggested realpath resolution was not implemented.
qwen/qwen3.6-35b-a3b — — Closed. Missing stage-packages occur because dpkg queries fail on /usr-merged core20 paths. Resolution requires resolving symbolic links before querying to correctly identify packages.
qwen3.6-35b-a3b-mtp-q6 — — Closed without public resolution or comments. The issue reported that stage-packages queries fail on core20's merged /usr paths because dpkg does not follow /lib symlinks. Suggested resolving symlinks before querying.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#3634 (confidence 100%)

    The maintainer cited this PR as the resolution for the /usr-merge path lookup problem.

Related issues

Issue Project State Summary Similarity
#6146 `base: core26` part conflict on `/lib`, `/bin` due to usrmerge snapcraft closed 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.
74%
#1833408 core20: fails to create snap with merged-usr snapcraft (launchpad) closed Fixed by merged snapcraft#2628 (commit 3f5799a72), making filesets preserve symlink directory paths during staging.
74%