main/postmarketos-initramfs: overwrite dest when extracting initramfs-extra (MR 4204)

If a file exists in the initramfs at runtime, cpio won't overwrite it
by default when extracting the initramfs-extra archive. This adds the -u
option to cpio, to overwrite any existing files in the destination.

This is meant to fix issues where the -extra archive has an app that is
meant to replace a busybox app, busybox --install creates it in the
initramfs and gzip will skip it since it's newer than what is in the
archive.
This commit is contained in:
Clayton Craft 2023-08-23 14:33:46 -07:00 committed by Caleb Connolly
parent 9fb29079cd
commit cfed09ca36
No known key found for this signature in database
GPG key ID: 7A342565FF635F79

View file

@ -328,7 +328,7 @@ extract_initramfs_extra() {
echo "Extract $initramfs_extra"
# uncompressed:
# cpio -di < "$initramfs_extra"
gzip -d -c "$initramfs_extra" | cpio -i
gzip -d -c "$initramfs_extra" | cpio -iu
}
wait_root_partition() {