Using dpkg with --force-unsafe-io to improve performance.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
a1a16183ec
commit
df67db053a
2 changed files with 72 additions and 0 deletions
71
debian/patches/progress-linux/0001-dpkg-force-unsafe-io.patch
vendored
Normal file
71
debian/patches/progress-linux/0001-dpkg-force-unsafe-io.patch
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
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
|
||||
@@ -10,6 +10,11 @@ case $ARCH in
|
||||
*) LIBC="libc6" ;;
|
||||
esac
|
||||
|
||||
+case $CODENAME in
|
||||
+ etch*|lenny) dpkg_force_unsafe_io="" ;;
|
||||
+ *) dpkg_force_unsafe_io="--force-unsafe-io" ;;
|
||||
+esac
|
||||
+
|
||||
work_out_debs () {
|
||||
case "$CODENAME" in
|
||||
etch*|lenny|squeeze|wheezy|jessie*|stretch|buster|bullseye|bookworm)
|
||||
@@ -160,7 +165,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 () {
|
||||
@@ -221,7 +226,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..."
|
||||
@@ -242,7 +247,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
|
||||
@@ -259,7 +264,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
|
||||
@@ -267,14 +272,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
|
||||
|
1
debian/patches/series
vendored
Normal file
1
debian/patches/series
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
progress-linux/0001-dpkg-force-unsafe-io.patch
|
Loading…
Add table
Add a link
Reference in a new issue