From 0f4e218448a573886b560d59086457670956a41b Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 6 Jun 2024 00:30:00 +0200 Subject: DEP17: Install /usr-merge aliasing symlinks. Closes: #1064459. --- debian/postinst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'debian/postinst') diff --git a/debian/postinst b/debian/postinst index 2708d17..e1ad3a4 100644 --- a/debian/postinst +++ b/debian/postinst @@ -108,4 +108,26 @@ if [ "$1" = "configure" ] && [ "$2" != "" ]; then fi fi +rtlddir="#USR_MERGE_RTLDLIB#" +if [ "$1" = "configure" ] && [ -n "$rtlddir" ]; then + # Remove temporary DEP17 M4 diversion added by glibc. + dpkg-divert --quiet --package base-files --remove --no-rename --divert "/.$rtlddir.usr-is-merged" "/$rtlddir" +fi + +if [ "$1" = "configure" ] || [ "$1" = "triggered" ]; then + for d in #USR_MERGE_MULTILIB#; do + if [ -d "$DPKG_ROOT/usr/$d" ]; then + if [ -L "$DPKG_ROOT/$d" ]; then + : + elif [ -d "$DPKG_ROOT/$d" ]; then + echo "Warning: /$d is not a symlink, but should be." 1>&2 + else + ln -s "usr/$d" "$DPKG_ROOT/$d" + fi + elif [ -L "$DPKG_ROOT/$d" ]; then + rm "$DPKG_ROOT/$d" + fi + done +fi + #DEBHELPER# -- cgit v1.2.3