From 7360d50fa6b7ef4809d28cf873ab7d29dc2a6f97 Mon Sep 17 00:00:00 2001 From: Thore Sommer Date: Tue, 27 Oct 2020 15:07:11 +0000 Subject: Added the option to include files before and after package installation Moved includes.chroot to includes.chroot_after_packages and added includes.chroot_before_packages. includes.chroot does still work as before. We also now use rsync for copying files if it is installed. This improves runtime and space consumption for large includes. Gbp-Dch: Short Closes: #927128 --- scripts/build/chroot_hostname | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts/build/chroot_hostname') diff --git a/scripts/build/chroot_hostname b/scripts/build/chroot_hostname index 2b7f3920f..d2faeca8b 100755 --- a/scripts/build/chroot_hostname +++ b/scripts/build/chroot_hostname @@ -67,9 +67,15 @@ EOF Acquire_lockfile # Copying hostname from includes, if existing - if [ -e config/includes.chroot/etc/hostname ] + INCLUDE_DIR=$(select_includes_chroot) + # includes.chroot_before_packages takes the highest precedence + if [ -e config/includes.chroot_before_packages/etc/hostname ] then - cp -a config/includes.chroot/etc/hostname chroot/etc/hostname + INCLUDE_DIR="includes.chroot_before_packages" + fi + if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/hostname ] + then + cp -a config/"${INCLUDE_DIR}"/etc/hostname chroot/etc/hostname fi Echo_message "Deconfiguring file /bin/hostname" -- cgit v1.2.3