Symbolic links inside .deb pulled as directories
Metadata
Current evaluation
Fixed by snapcore/snapcraft PR #941 (commit 2ed733d7c), adding symlink support when extracting Debian source packages.
Resolution: closed resolved
Reason: The maintainer traced the behavior to python3-apt and linked PR #941 as the fix. Commit 2ed733d7c records the merged change to support symlinks in Debian sources.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I have a Debian package that installs a library and a symbolic link to the library. The symlinks end up being installed as empty directories. I would expect symlinks to be preserved.
I'm using snapcraft version 2.19.
As an example/repro, take the package libgweather.
It installs a library and symlink to the library.
mberger@bldecos-1:/var/cache/apt/archives$ dpkg -c libgweather-3-6_3.18.2-0ubuntu0.1_amd64.deb | grep "\.so"
-rw-r--r-- root/root 153808 2016-09-14 08:27 ./usr/lib/x86_64-linux-gnu/libgweather-3.so.6.5.0
lrwxrwxrwx root/root 0 2016-09-14 08:27 ./usr/lib/x86_64-linux-gnu/libgweather-3.so.6 -> libgweather-3.so.6.5.0
The relevant snapcraft.yaml parts entry...
parts:
my-part:
# See 'snapcraft plugins'
plugin: dump
source: /var/cache/apt/archives/libgweather-3-6_3.18.2-0ubuntu0.1_amd64.deb
The result of the pull...
mberger@bldecos-1:/builds2/mberger/bug$ ls -l parts/my-part/src/usr/lib/x86_64-linux-gnu/
total 156
drwxr-xr-x 2 mberger xcore 4096 Oct 19 05:31 libgweather-3.so.6
-rw-r--r-- 1 mberger xcore 153808 Sep 14 08:27 libgweather-3.so.6.5.0
Which finds its way into the snap.
mberger@bldecos-1:/builds2/mberger/bug$ unsquashfs -ll my-snap-name_0.1_amd64.snap
Parallel unsquashfs: Using 4 processors
56 inodes (400 blocks) to write
...
drwxr-xr-x root/root 3 2016-10-19 05:31 squashfs-root/usr/lib/x86_64-linux-gnu/libgweather-3.so.6
-rw-r--r-- root/root 153808 2016-09-14 08:27 squashfs-root/usr/lib/x86_64-linux-gnu/libgweather-3.so.6.5.0
...
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft PR #941 (commit 2ed733d7c), adding symlink support when extracting Debian source packages. | |
| stealth/space-bunny-alpha | — | closed resolved | Deb symlinks extracted as empty directories. Fixed by merged snapcore/snapcraft PR #941 (commit 2ed733d7c), replacing python3-apt based .deb extraction with python3-debian so symlinks are preserved. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged snapcore/snapcraft PR #941 (commit 2ed733d7c), which switched DEB extraction to python3-debian so package symlinks are preserved. | |
| stealth/space-bunny-alpha | — | closed resolved | DEB symlink extraction was fixed by canonical/snapcraft#941, commit 2ed733d7c, which switched extraction to python3-debian. Launchpad #1634813 itself closed without resolution. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed .deb symlink extraction in canonical/snapcraft PR #941, merged as 2ed733d7c; it switched extraction to python3-debian to preserve symbolic links. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Symbolic links inside .deb packages were incorrectly extracted as empty directories during snapcraft pull, but no fix or follow-up was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The snapcraft dump plugin incorrectly extracted symbolic links from .deb packages as empty directories instead of preserving them. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#941
(confidence 100%)
The linked PR was implemented by commit 2ed733d7c to preserve symlinks in extracted .deb sources.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #941 sources: support symlinks in deb sources | snapcraft | merged | Merged PR #941 (commit 2ed733d7c), switching deb extraction to python3-debian so symlinks in deb sources are preserved instead of becoming directories. |