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_resolv | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts/build/chroot_resolv') diff --git a/scripts/build/chroot_resolv b/scripts/build/chroot_resolv index c943f259d..49cb978ee 100755 --- a/scripts/build/chroot_resolv +++ b/scripts/build/chroot_resolv @@ -75,10 +75,16 @@ case "${_ACTION}" in # Acquire lock file Acquire_lockfile - if [ -e config/includes.chroot/etc/resolv.conf ] + INCLUDE_DIR=$(select_includes_chroot) + # includes.chroot_before_packages takes the highest precedence + if [ -e config/includes.chroot_before_packages/etc/resolv.conf ] + then + INCLUDE_DIR="includes.chroot_before_packages" + fi + if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/resolv.conf ] then # Copying local resolv.conf - cp config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf + cp config/"${INCLUDE_DIR}"/etc/resolv.conf chroot/etc/resolv.conf chmod 644 chroot/etc/resolv.conf Chroot chroot "chown root:root /etc/resolv.conf" rm -f chroot/etc/resolv.conf.orig -- cgit v1.2.3