Debian Codegraph @

debian/@[email protected]

raw
1 #!/bin/sh
2 set -e
3
4 if [ "$1" = install ] || [ "$1" = upgrade ]; then
5 FILE="/usr/libexec/@DEB_HOST_MULTIARCH@/isa-support/test-@NAME@"
6 # "exec >;command" instead of "command >" looks strange but regular
7 # redirections don't fully work within qemu-user.
8 ret=0;(exec >/dev/null 2>&1; "$FILE") || ret=$?
9 if [ $ret -ne 0 ] && [ -n "$IGNORE_ISA" ]; then
10 cat >&2 <<END
11 This machine doesn't support @NAME@, but override (IGNORE_ISA) is enabled.
12 Continuing...
13 END
14 ret=0
15 fi
16
17 if [ $ret -eq 126 ]; then
18 cat >&2 <<END
19 Couldn't execute test binary for @NAME@, you either do foreign multi-arch
20 without qemu or do something strange. Assuming you know what you're doing.
21 Continuing...
22 END
23 ret=0
24 fi
25
26 if [ $ret -ne 0 ]; then
27 # Fail noisily, first via debconf (if installed).
28 if [ -e /usr/share/debconf/confmodule ]; then
29
30 . /usr/share/debconf/confmodule
31 db_version 2.0
32
33 db_fset @NAME@-support/fail seen false ||:
34 db_reset @NAME@-support/fail ||:
35 db_input critical @NAME@-support/fail ||:
36 db_go ||:
37 db_stop ||:
38 fi
39
40 cat >&2 <<END
41 This machine doesn't support @NAME@, sorry.
42 Aborting.
43 END
44 exit 2
45 fi
46 fi
47
48 #DEBHELPER#
49
50 exit 0