lib, src: Include missing <stdbool.h>
[dpkg.git] / debian / bug-script
blob92b933da11b07148c41be13c5f3602d29a5a692b
1 #!/bin/sh
3 get_vendor()
5 local origin="$DPKG_ROOT/etc/dpkg/origins/default"
6 local vendor
8 if [ -n "$DEB_VENDOR" ]; then
9 vendor="$DEB_VENDOR"
10 elif [ -e "$origin" ]; then
11 vendor=$(sed -ne 's/^Vendor: *\([^ ]\+\) */\1/p' "$origin" | tr A-Z a-z)
14 echo "${vendor:-default}"
17 check_merged_usr_via_aliased_dirs()
19 local vendor
21 vendor=$(get_vendor)
23 case "$vendor" in
24 debian)
25 # In Debian some people have gotten so offended by the following _warning_
26 # that they have resorted to bullying and abuse. Life's too short, sorry.
27 return
29 ubuntu)
30 # Ubuntu does not seem interested in it.
31 return
33 esac
35 for d in /bin /sbin /lib /lib32 /libo32 /libx32 /lib64; do
36 linkname="$(readlink $d)"
37 if [ "$linkname" = "usr$d" ] || [ "$linkname" = "/usr$d" ]; then
38 echo "This system uses merged-usr-via-aliased-dirs, going behind dpkg's" >&3
39 echo "back, breaking its core assumptions. This can cause silent file" >&3
40 echo "overwrites and disappearances, and its general tools misbehavior." >&3
41 echo "See <https://wiki.debian.org/Teams/Dpkg/FAQ#broken-usrmerge>." >&3
42 break
44 done
47 check_merged_usr_via_aliased_dirs