Copy files in '*/overlay/*' after running fixup scripts

This patch is to overwrite successfully the file installed by a package.

Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I743cb8dc23dc86ef272312b6f4fdd41fa4d46261
This commit is contained in:
Dongjin Kim
2021-04-24 01:47:21 +09:00
parent 2a4b95a028
commit 258a4b1ea9
3 changed files with 11 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ rm -f /etc/apt/sources.list.d/launchpad-hardkernel-ppa.list
apt update && apt upgrade -y
apt install -y --no-install-recommends \
odroid-base \
rsync \
@@DEFAULT_FLAVOUR_PACKAGES@@ \
@@DEFAULT_KERNEL_PACKAGE@@ \
@@DEFAULT_BOOTSCRIPT_PACKAGE@@

View File

@@ -9,4 +9,6 @@ setenv bootargs "\${bootargs} boot=casper toram"
__EOF
fi
/usr/sbin/flash-kernel
rsync -a /overlay/* /
/usr/sbin/update-initramfs -u
rm -rf /overlay

View File

@@ -336,11 +336,6 @@ do_preinstall() {
if [ ! "x${QEMU_BINARY}" = "x" ]; then
cp ${QEMU_BINARY} ${rootfs_mnt}/${QEMU_BINARY} || panic "error"
fi
[ -d ${TOPDIR}/overlay ] && rsync -a ${TOPDIR}/overlay/* ${rootfs_mnt}/
[ -d ${WORKDIR}/overlay ] && rsync -a ${WORKDIR}/overlay/* ${rootfs_mnt}/
[ -d ${TOPDIR}/custom/${CUSTOMOS}/overlay ] \
&& rsync -a ${TOPDIR}/custom/${CUSTOMOS}/overlay/* ${rootfs_mnt}/
}
do_postinstall() {
@@ -362,6 +357,13 @@ get_install_fixups() {
}
do_run_fixups() {
mkdir -p ${rootfs_mnt}/overlay
[ -d ${TOPDIR}/overlay ] && rsync -a ${TOPDIR}/overlay/* ${rootfs_mnt}/overlay/
[ -d ${WORKDIR}/overlay ] && rsync -a ${WORKDIR}/overlay/* ${rootfs_mnt}/overlay/
[ -d ${TOPDIR}/custom/${CUSTOMOS}/overlay ] \
&& rsync -a ${TOPDIR}/custom/${CUSTOMOS}/overlay/* ${rootfs_mnt}/overlay/
for fixup in $(get_install_fixups); do
chroot ${rootfs_mnt} ${QEMU_BINARY} \
/bin/sh ${fixups_dir}/$(basename ${fixup}) || \