forked from Mirror/pmbootstrap
pmb.build: use pigz instead of gzip (MR 2252)
This is multithreaded, and by consequence much much faster than default gzip. Since we switched to running gzip from the native chroot we also changed from running it in the fastest mode, now we're running it with -9 it can be pretty slow on any kind of mobile hardware. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
31cc898dd5
commit
1232c35e48
2 changed files with 4 additions and 1 deletions
|
@ -20,6 +20,9 @@ def init_abuild_minimal(args: PmbArgs, chroot: Chroot=Chroot.native()):
|
|||
if os.path.exists(marker):
|
||||
return
|
||||
|
||||
# pigz is multithreaded and makes compression must faster, we install it in the native
|
||||
# chroot and then symlink it into the buildroot so we aren't running it through QEMU.
|
||||
pmb.chroot.apk.install(args, ["pigz"], Chroot.native(), build=False)
|
||||
pmb.chroot.apk.install(args, ["abuild"], chroot, build=False)
|
||||
|
||||
# Fix permissions
|
||||
|
|
|
@ -107,7 +107,7 @@ def mount_native_into_foreign(args: PmbArgs, chroot: Chroot):
|
|||
if not musl_link.is_symlink():
|
||||
pmb.helpers.run.root(args, ["ln", "-s", "/native/lib/" + musl,
|
||||
musl_link])
|
||||
pmb.helpers.run.root(args, ["ln", "-sf", "/native/bin/busybox", "/usr/local/bin/gzip"])
|
||||
pmb.helpers.run.root(args, ["ln", "-sf", "/native/usr/bin/pigz", "/usr/local/bin/pigz"])
|
||||
|
||||
def remove_mnt_pmbootstrap(args: PmbArgs, chroot: Chroot):
|
||||
""" Safely remove /mnt/pmbootstrap directories from the chroot, without
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue