summaryrefslogtreecommitdiffstats
path: root/debian/preinst
blob: b657de52b5724728d301ffbe543d1926f86500a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
set -e

if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
  for d in bin lib lib32 lib64 libo32 lib64 sbin; do
    if [ -d "$DPKG_ROOT/$d" ] && [ ! -L "$DPKG_ROOT/$d" ]; then
      cat <<EOF


******************************************************************************
*
* The base-files package cannot be installed because this system has a
* split /usr.
*
* Please install the usrmerge package to convert this system to merged-/usr.
*
* For more information please read https://wiki.debian.org/UsrMerge.
*
******************************************************************************


EOF
      exit 1
    fi
  done
  for d in #USR_MERGE_MULTILIB#; do
    # Install DEP17 M4 protective diversions
    dpkg-divert --quiet --package base-files --add --no-rename --divert "/.$d.usr-is-merged" "/$d"
  done
fi

#DEBHELPER#