diff options
| author | 2024-08-04 22:40:00 +0200 | |
|---|---|---|
| committer | 2024-08-04 23:33:36 +0200 | |
| commit | e4671b84443d9f67fd1d29a19378d058be6ddec2 (patch) | |
| tree | 322a107b34d6da49dce63c206cc865bc5fb82220 /debian | |
| parent | 78e1dfac7ac37a5dc347dcb80337e81333ee4e19 (diff) | |
| download | base-files-e4671b84443d9f67fd1d29a19378d058be6ddec2.tar.gz base-files-e4671b84443d9f67fd1d29a19378d058be6ddec2.zip | |
debian/preinst: Work around /lib64 link created by systemd-nspawn. Closes: #1077866.
Diffstat (limited to '')
| -rw-r--r-- | debian/preinst | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/debian/preinst b/debian/preinst index 51092f1..de5b1f1 100644 --- a/debian/preinst +++ b/debian/preinst @@ -5,8 +5,19 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then msg= for d in bin lib lib32 lib64 libo32 libx32 sbin; do if [ -L "$DPKG_ROOT/$d" ]; then - if [ "$(readlink "$DPKG_ROOT/$d")" != "usr/$d" ]; then - msg="/$d is a symbolic link and not pointing at usr/$d exactly" + target=$(readlink "$DPKG_ROOT/$d") + if [ "$target" != "usr/$d" ]; then + if [ "$d" = lib64 ] && [ "$target" = "usr/lib/#DEB_HOST_MULTIARCH#" ]; then + # Work around https://github.com/systemd/systemd/issues/33919 + echo "Fixing bad /$d symbolic link created by systemd-nspawn." + if [ -d "$DPKG_ROOT/usr/$d" ]; then + ln -sf "usr/$d" "$DPKG_ROOT/$d" + else + rm "$DPKG_ROOT/$d" + fi + else + msg="/$d is a symbolic link and not pointing at usr/$d exactly" + fi elif [ ! -d "$DPKG_ROOT/usr/$d" ]; then msg="/$d is a dangling symbolic link" fi |
