debian/preinst: Work around /lib64 link created by systemd-nspawn. Closes: #1077866.
This commit is contained in:
committed by
Santiago Vila
parent
78e1dfac7a
commit
e4671b8444
Vendored
+13
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user