diff --git a/custom-scripts/scripts/post_purge_exceptions b/custom-scripts/scripts/post_purge_exceptions index cf97dbb0b9d7313af368c80635cfbbd997fbeecd..a1dd47e29e1687e479c8ecabe3b4f0128b25e315 100755 --- a/custom-scripts/scripts/post_purge_exceptions +++ b/custom-scripts/scripts/post_purge_exceptions @@ -53,6 +53,13 @@ case ${PIUPARTS_OBJECTS%%=*} in log_debug sleep 10 ;; + *usr-is-merged*|*usrmerge*) + # Remove the exception flag that we added in pre_install_exceptions, if we added it + if [ -f /etc/unsupported-skip-usrmerge-conversion.piuparts ]; then + log_debug + rm -f /etc/unsupported-skip-usrmerge-conversion* + fi + ;; esac if [ -f /var/run/piuparts-stamp-dkms-installed ]; then diff --git a/custom-scripts/scripts/pre_install_exceptions b/custom-scripts/scripts/pre_install_exceptions index 5b7c5eca48a0bb6a67723133402167887ea73f68..91ae5b5f8f6673325d2aacb3135c69a71ef1ca8b 100755 --- a/custom-scripts/scripts/pre_install_exceptions +++ b/custom-scripts/scripts/pre_install_exceptions @@ -106,6 +106,20 @@ case ${PIUPARTS_OBJECTS%%=*} in mkdir -p /var/state/samhain/ touch /var/state/samhain/samhain_file ;; + *usr-is-merged*|*usrmerge*) + # usr-is-merged intentionally fails to install unless either the system is merged-usr, or + # the exception flag is set. + # usrmerge does a live-upgrade of the chroot, which piuparts does not expect, so skip it. + # debootstrap will take care of this in a future update, so remember if we were the ones + # that added the flag file, to remove it in the post_purge_exceptions script. + # For details on the flag file, see: https://sources.debian.org/src/usrmerge/27/debian/README.Debian/#L66 + # and: https://lists.debian.org/debian-ctte/2022/07/msg00019.html + if [ ! -f /etc/unsupported-skip-usrmerge-conversion ]; then + log_debug + touch /etc/unsupported-skip-usrmerge-conversion.piuparts + echo "this system will not be supported in the future" > /etc/unsupported-skip-usrmerge-conversion + fi + ;; esac if [ "$PIUPARTS_DISTRIBUTION" = "jessie" ]; then