ci-test-sample/debian/patches/0061-ubuntu-initramfs-compr...

31 lines
1.2 KiB
Diff

From: =?utf-8?b?6LCi54Kc?= <xiewei@kylinos.cn>
Date: Fri, 30 Mar 2018 11:39:26 +0800
Subject: ubuntu-initramfs-compression-symlinks
---
scripts/build/lb_chroot_hacks | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks
index 5756971..997f5ba 100755
--- a/scripts/build/lb_chroot_hacks
+++ b/scripts/build/lb_chroot_hacks
@@ -195,7 +195,7 @@ case "${LB_INITRAMFS_COMPRESSION}" in
;;
bzip2)
- for INITRAMFS in $(find chroot/boot -name 'initrd*'); do
+ for INITRAMFS in $(find chroot/boot -name 'initrd*' -not -type l); do
zcat "${INITRAMFS}" | bzip2 -c ${BZIP2_OPTIONS} > "${INITRAMFS}.new"
mv "${INITRAMFS}.new" "${INITRAMFS}"
done
@@ -205,7 +205,7 @@ case "${LB_INITRAMFS_COMPRESSION}" in
# We probably ought to use COMPRESS= in a temporary file in
# /etc/initramfs-tools/conf.d/ instead, but it's hard to
# pass options that way.
- for INITRAMFS in $(find chroot/boot -name 'initrd*'); do
+ for INITRAMFS in $(find chroot/boot -name 'initrd*' -not -type l); do
zcat "${INITRAMFS}" | lzma -c ${LZMA_OPTIONS} > "${INITRAMFS}.new"
mv "${INITRAMFS}.new" "${INITRAMFS}"
done