blob: b3659395d3132acf01803ccae478d64718293ce2 (
plain)
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
|
Author: Daniel Baumann <daniel.baumann@progress-linux.org>
Description: Using dpkg with --force-unsafe-io to improve performance.
diff -Naurp debootstrap.orig/scripts/debian-common debootstrap/scripts/debian-common
--- debootstrap.orig/scripts/debian-common
+++ debootstrap/scripts/debian-common
@@ -1,3 +1,13 @@
+case $CODENAME in
+ etch*|lenny)
+ dpkg_force_unsafe_io=""
+ ;;
+
+ *)
+ dpkg_force_unsafe_io="--force-unsafe-io"
+ ;;
+esac
+
if doing_variant fakechroot; then
test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started"
fi
@@ -94,7 +104,7 @@ Status: install ok installed" >> "$TARGE
x_feign_install dpkg
x_core_install () {
- smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ smallyes '' | in_target dpkg --force-depends $dpkg_force_unsafe_io --install $(debfor "$@")
}
p () {
@@ -155,7 +165,7 @@ Status: install ok installed" >> "$TARGE
smallyes '' |
(repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \
- dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg --status-fd 8 --force-depends $dpkg_force_unsafe_io --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) |
dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING
info CONFREQ "Configuring required packages..."
@@ -176,7 +186,7 @@ echo \"Warning: Fake start-stop-daemon c
smallyes '' |
(in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \
- dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends $dpkg_force_unsafe_io 8>&1 1>&7 || echo EXITCODE $?) |
dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING
baseprog=0
@@ -193,7 +203,7 @@ echo \"Warning: Fake start-stop-daemon c
# XXX: progress is tricky due to how dpkg_progress works
# -- cjwatson 2009-07-29
p; smallyes '' |
- in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep)
+ in_target dpkg --force-overwrite --force-confold $dpkg_force_unsafe_io --skip-same-version --install $(debfor $predep)
base=$(without "$base" "$predep")
done_predeps="$done_predeps $predep"
done
@@ -201,14 +211,14 @@ echo \"Warning: Fake start-stop-daemon c
if [ -n "$base" ]; then
smallyes '' |
(repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \
- dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg --status-fd 8 --force-overwrite --force-confold $dpkg_force_unsafe_io --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) |
dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING
info CONFBASE "Configuring the base system..."
smallyes '' |
(repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be re-attempted up to five times." "" \
- dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg --status-fd 8 --force-confold --skip-same-version $dpkg_force_unsafe_io --configure -a 8>&1 1>&7 || echo EXITCODE $?) |
dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING
fi
|