Add some speedups to dpkg
The docker build folks obsess about image size and speed a bit. Grab a few of their optimizations from their debootstrap build process and apply them to ours. Change-Id: Ic3d3565423b0ae090896d99fd3bf1145eca6303d
This commit is contained in:
parent
f1c90ae72a
commit
6be5c396d1
9
elements/dpkg/cleanup.d/60-untrim-dpkg
Executable file
9
elements/dpkg/cleanup.d/60-untrim-dpkg
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
[ -n "$TARGET_ROOT" ]
|
||||||
|
|
||||||
|
sudo rm $TARGET_ROOT/etc/dpkg/dpkg.cfg.d/02apt-speedup
|
||||||
|
sudo rm $TARGET_ROOT/etc/apt/apt.conf.d/no-languages
|
12
elements/dpkg/root.d/99-trim-dpkg
Executable file
12
elements/dpkg/root.d/99-trim-dpkg
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
[ -n "$TARGET_ROOT" ]
|
||||||
|
|
||||||
|
# During image build, sync calls are expensive overhead
|
||||||
|
echo 'force-unsafe-io' | sudo tee $TARGET_ROOT/etc/dpkg/dpkg.cfg.d/02apt-speedup > /dev/null
|
||||||
|
|
||||||
|
# and remove the translations, too
|
||||||
|
echo 'Acquire::Languages "none";' | sudo tee $TARGET_ROOT/etc/apt/apt.conf.d/no-languages > /dev/null
|
Loading…
Reference in New Issue
Block a user