Symbolic links inside .deb pulled as directories

Bug #1634813 reported by Michael Berger
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Kyle Fazzari

Bug Description

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
...

Tags: sources
Revision history for this message
Loïc Minier (lool) wrote :

I can repro the issue with snapcraft 2.19

Leo Arias (elopio)
Changed in snapcraft:
status: New → Confirmed
tags: added: sources
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

This seems to be an issue with python3-apt. The proposed fix is to use python3-debian instead: https://github.com/snapcore/snapcraft/pull/941

Kyle Fazzari (kyrofa)
Changed in snapcraft:
status: Confirmed → In Progress
assignee: nobody → Kyle Fazzari (kyrofa)
importance: Undecided → High
Changed in snapcraft:
milestone: none → next
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.