This file is indexed.

postinst is in binutils-multiarch 2.30-15ubuntu1.

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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#! /bin/sh
# Update .so symlinks and remove obsolete diversions.
#
# Removing a diversion requires a guarantee that the conflicting
# file is not present any more, and we cannot guarantee that if
# some other version of binutils-multiarch is installed.
# So we remove the diversions in postinst, not preinst.
set -e
ma=x86_64-linux-gnu
triplet=x86_64-linux-gnu
old_diversion() {
	local divertto file
	file=$1
	divertto=${2-$file.single}
	if
		dpkg-divert --package binutils-multiarch --list |
		grep -q -F "$divertto"
	then
		dpkg-divert --package binutils-multiarch \
				--remove --rename \
				--divert "$divertto" "$file"
	fi
}

# remove obsolete diversions
old_diversion /usr/bin/ld.bfd
old_diversion /usr/bin/c++filt
old_diversion /usr/lib/libbfd.a /usr/lib/libbfd-single.a
old_diversion /usr/lib/libopcodes.a /usr/lib/libopcodes-single.a
old_diversion /usr/bin/ld
old_diversion /usr/bin/elfedit
for f in elf32_sparc elf32ppc elf64alpha elf_i386 m68kelf \
         alpha i386linux m68klinux sparclinux sun4
do
	for ext in x xbn xn xr xs xu
	do
		old_diversion /usr/lib/ldscripts/$f.$ext
	done
done
old_diversion /usr/lib/libbfd-2.9.1.0.15.so.0.0.0 \
              /usr/lib/libbfd-single-2.9.1.0.15.so.0.0.0
old_diversion /usr/lib/libopcodes-2.9.1.0.15.so.0.0.0 \
              /usr/lib/libopcodes-single-2.9.1.0.15.so.0.0.0
old_diversion /usr/lib/libbfd.la /usr/lib/libbfd-single.la
old_diversion /usr/lib/libopcodes.la /usr/lib/libopcodes-single.la
old_diversion /usr/include/bfd.h /usr/include/bfd.single.h
old_diversion /usr/lib/ldscripts

rm -f /usr/lib/libbfd-*-multiarch.so.0
rm -f /usr/lib/libopcodes-*-multiarch.so.0

old_diversion /usr/bin/addr2line
old_diversion /usr/bin/ar
old_diversion /usr/bin/embedspu
old_diversion /usr/bin/gprof
old_diversion /usr/bin/nm
old_diversion /usr/bin/objcopy
old_diversion /usr/bin/objdump
old_diversion /usr/bin/ranlib
old_diversion /usr/bin/readelf
old_diversion /usr/bin/size
old_diversion /usr/bin/strings
old_diversion /usr/bin/strip

case "$ma" in i386-*)
  if test -n "$context" && dpkg --compare-versions "$2" lt "2.27-8"; then
    old_diversion /usr/bin/$ma-addr2line
    old_diversion /usr/bin/$ma-ar
    old_diversion /usr/bin/$ma-embedspu
    old_diversion /usr/bin/$ma-gprof
    old_diversion /usr/bin/$ma-nm
    old_diversion /usr/bin/$ma-objcopy
    old_diversion /usr/bin/$ma-objdump
    old_diversion /usr/bin/$ma-ranlib
    old_diversion /usr/bin/$ma-readelf
    old_diversion /usr/bin/$ma-size
    old_diversion /usr/bin/$ma-strings
    old_diversion /usr/bin/$ma-strip
  fi
esac