diff --git a/live-build/auto/config b/live-build/auto/config index 6992130e..53c22275 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1066,8 +1066,20 @@ EOF ;; ubuntu-touch:*|ubuntu-touch-custom:*|ubuntu-core:system-image|ubuntu-desktop-next:system-image|ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled) - cp -afL /usr/share/livecd-rootfs/live-build/${PROJECT}/* \ - config/ + # Ensure that most things e.g. includes.chroot are copied as is + for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do + case entry in + hooks) + # But hooks are shared across the projects with symlinks + # dereference them + cp -afL $entry config/ + ;; + *) + # Most places want to preserve symlinks as is + cp -af $entry config/ + ;; + esac + done if [ "$PROJECT" = "ubuntu-cpc" ]; then case ${IMAGE_TARGETS:-} in