initial commit
[glibc.git] / debian / debhelper.in / libc.postrm
1 #! /bin/sh
2 set -e
3
4 if [ "$1" = remove ]; then
5 # When both the multiarch and the corresponding biarch packages are
6 # installed, removing the multiarch package will remove the dynamic
7 # linker. Recreate it in the postinst.
8 ARCH=${DPKG_MAINTSCRIPT_ARCH}
9 target=$(dpkg-query -L LIBC-${ARCH} 2>/dev/null | grep -E '/lib.+/(ld\.so|RTLD_SO)$' || true)
10 if [ -f "$target" ] && ! [ -f RTLDDIR/RTLD_SO ] ; then
11 ln -sf ${target#RTLDDIR/} RTLDDIR/RTLD_SO
12 fi
13 fi
14
15 if [ "$1" = deconfigure ]; then
16 :; # blah, do something useful with ldso
17 fi
18
19 #DEBHELPER#
20
21 exit 0