This file is indexed.

postinst is in qemu-user-static 2.0.0~rc1+dfsg-0ubuntu3.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
set -e
# binfmt registration/deregistration
if [ configure = "$1" ] && [ -x /usr/sbin/update-binfmts ]; then
	# list of architectures is autogenerated from debian/rules
	for target in aarch64 alpha arm armeb cris i386 m68k microblaze mips mipsel ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64 x86_64 ; do
		if [ -f /var/lib/binfmts/qemu-$target ]; then
			# remove format, in case the current version no longer supports it.
			update-binfmts --package qemu-user-static --remove qemu-$target /usr/bin/qemu-$target-static
		fi
		if [ -f /usr/share/binfmts/qemu-$target ]; then
			# install currently supported format.
			update-binfmts --import qemu-$target
		fi
	done
fi

if dpkg --compare-versions "$2" lt-nl 1.7.0+dfsg-2ubuntu9 \
   && [ -x /usr/sbin/update-binfmts ] \
   && [ -f /var/lib/binfmts/qemu-arm64 ]
then
	update-binfmts --package qemu-user-static --remove qemu-arm64 /usr/bin/qemu-arm64-static
fi