File: pre_install_exceptions

package info (click to toggle)
piuparts 0.62
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,692 kB
  • sloc: python: 6,823; sh: 2,194; makefile: 126
file content (245 lines) | stat: -rwxr-xr-x 5,925 bytes parent folder | download | duplicates (3)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
#!/bin/sh
set -e

log_debug() {
	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
}

case ${PIUPARTS_OBJECTS%%=*} in
	file-rc)
		case "$PIUPARTS_DISTRIBUTION" in
			lenny|squeeze*)
				# force installation and removal of essential package sysv-rc
				log_debug
				yes 'Yes, do as I say!' | apt-get -y --force-yes install file-rc
				;;
		esac
		;;
	live-config-upstart|\
	netscript-2.4-upstart|\
	upstart)
		case "$PIUPARTS_DISTRIBUTION" in
			squeeze*|wheezy*)
				# force installation and removal of essential package sysvinit
				log_debug
				yes 'Yes, do as I say!' | apt-get -y --force-yes install upstart
				;;
		esac
		;;
	upstart-dconf-bridge|\
	upstart-monitor)
		# switch init to upstart before installation
		apt-get install upstart
		;;
	systemd-sysv)
		case "$PIUPARTS_DISTRIBUTION" in
			wheezy*)
				# force installation and removal of essential package sysvinit
				log_debug
				yes 'Yes, do as I say!' | apt-get -y --force-yes install systemd-sysv
				;;
		esac
		;;
esac

#
# the remaining exceptions are only for the initial package installation
#
if [ "$PIUPARTS_PHASE" != "install" ]; then
	exit 0
fi

case ${PIUPARTS_OBJECTS%%=*} in
	samhain)		log_debug
				# work around #749602
				mkdir -p /var/state/samhain/
				touch /var/state/samhain/samhain_file
				;;
	fai-nfsroot)		log_debug
				# fai-nfsroot refuses installation unless this file exist
				touch /.THIS_IS_THE_FAI_NFSROOT
				;;
	education-thin-client|\
	ltsp-client|\
	ltsp-client-core)	log_debug
				# ltsp-client-core refuses installation unless this file exist
				touch /etc/ltsp_chroot
				;;
	bugzilla3)
			# checksetup.pl goes into infinite loop asking for them
			log_debug
			echo "bugzilla3 bugzilla3/bugzilla_admin_name string bz@local.host" | debconf-set-selections
			echo "bugzilla3 bugzilla3/bugzilla_admin_real_name string Bz" | debconf-set-selections
			echo "bugzilla3 bugzilla3/bugzilla_admin_pwd password bzbzbzbz" | debconf-set-selections
			;;
esac

if [ "$PIUPARTS_DISTRIBUTION" = "wheezy-backports" ]; then

	case ${PIUPARTS_OBJECTS%%=*} in
		libreoffice-style-*)
			log_debug
			apt-get -y -t $PIUPARTS_DISTRIBUTION install ${PIUPARTS_OBJECTS%%=*} libreoffice-common-
			;;
	esac

fi

if [ "$PIUPARTS_DISTRIBUTION" = "squeeze-backports" ]; then

	case ${PIUPARTS_OBJECTS%%=*} in
		ekeyd)
			log_debug
			apt-get -y install udev
			;;
	esac

fi

if	[ "$PIUPARTS_DISTRIBUTION" = "squeeze" ] || \
	[ "$PIUPARTS_DISTRIBUTION" = "squeeze-proposed" ] || \
	[ "$PIUPARTS_DISTRIBUTION" = "squeeze-backports" ] || \
	[ "$PIUPARTS_DISTRIBUTION" = "lenny" ]; then

	case ${PIUPARTS_OBJECTS%%=*} in
		autopkgtest-xenlvm|\
		clvm|\
		cman|\
		collectd|\
		collectd-dbg|\
		collectd-utils|\
		dtc-xen|\
		ganeti|\
		ganeti2|\
		gfs-tools|\
		gfs2-tools|\
		libcollectdclient0|\
		libcollectdclient-dev|\
		liblinux-lvm-perl|\
		libsys-virt-perl|\
		libvirt0|\
		libvirt0-dbg|\
		libvirt-dev|\
		libvirt-ocaml|\
		libvirt-ocaml-dev|\
		libvirt-ruby|\
		libvirt-ruby1.8|\
		mozilla-virt-viewer|\
		munin-libvirt-plugins|\
		mylvmbackup|\
		python-libvirt|\
		redhat-cluster-suite|\
		rgmanager|\
		virtinst|\
		virt-top|\
		virt-viewer|\
		xenwatch|\
		lvm2)
			# work around lvm2 bug https://bugs.debian.org/603036 which is squeeze-ignore
			log_debug
			apt-get -y install udev
			;;
	esac

fi

if [ "$PIUPARTS_DISTRIBUTION" = "squeeze" ]; then

	case ${PIUPARTS_OBJECTS%%=*} in
		bootcd-ia64)
				if [ "$PIUPARTS_TEST" = "distupgrade" ] && [ "$(uname -m)" = "x86_64" ]; then
					#622690: bootcd-ia64 has a Pre-Depends/Depends cycle that apt cannot resolve
					log_debug
					apt-get -y install bootcd-i386
				fi
				;;
		mini-buildd-bld|mini-buildd-rep)
				#632955, #656746 - time limit exceeded during install
				log_debug
				echo "*** ABORT - Installation would deadlock ***"
				exit 1
				;;
	esac

fi

if [ "$PIUPARTS_DISTRIBUTION" = "lenny" ]; then

	# install undeclared dependencies
	case ${PIUPARTS_OBJECTS%%=*} in
		clamav-getfiles)
				#603082
				log_debug
				apt-get -y install curl
				;;
		cyrus-*-2.2|sa-learn-cyrus)
				#694254 db4.2-util exists in lenny only and is needed for upgrades to wheezy
				log_debug
				apt-get -y install db4.2-util
				;;
		debian-edu-artwork-usplash)
				# postinst fails without update-initramfs
				log_debug
				apt-get -y install initramfs-tools
				;;
		gforge-shell-postgresql|gforge-plugin-scmcvs|gforge-plugin-scmsvn)
				#604218
				log_debug
				apt-get -y install libcap2
				;;
		otrs2)
				#561889
				log_debug
				apt-get -y install libapache2-mod-perl2
				;;
		sdic-gene95)
				#478592
				log_debug
				apt-get -y install bzip2 wget
				;;
		tftpd-hpa)
				#522780
				log_debug
				apt-get -y install update-inetd
				;;
		ttf-beteckna)
				#502707
				log_debug
				apt-get -y install defoma
				;;
	esac

	# prefer inn over cnews (bad version number cr.g7-40.4)
	case ${PIUPARTS_OBJECTS%%=*} in
		newsx|post-faq)
				log_debug
				apt-get -y install inn
				;;
	esac

	# work around postinst failures
	case ${PIUPARTS_OBJECTS%%=*} in
		ion3)
			# annoying debconf prompt
			log_debug
			echo "ion3 ion3/acknowledge-maybe-outdated boolean true" | debconf-set-selections
			echo "ion3 ion3/acknowledge-outdated boolean true" | debconf-set-selections
			;;
		ipppd|ibod|isdnutils)
			#542156
			log_debug
			test -e /dev/MAKEDEV || ln -sfv /sbin/MAKEDEV /dev/MAKEDEV
			;;
	esac

	# allow lenny kernel image installation in chroot
	for flavor in amd64 openvz-amd64 vserver-amd64 xen-amd64 486 686 686-bigmem openvz-686 vserver-686 vserver-686-bigmem xen-686
	do
		echo "linux-image-2.6.26-2-$flavor linux-image-2.6.26-2-$flavor/preinst/bootloader-initrd-2.6.26-2-$flavor boolean false"
		echo "linux-image-2.6.26-2-$flavor linux-image-2.6.26-2-$flavor/preinst/lilo-initrd-2.6.26-2-$flavor boolean false"
	done | debconf-set-selections

	# deterministic /bin/sh on upgrades
	echo "dash dash/sh boolean true" | debconf-set-selections

fi