From 98b4fdcd821db711f29507f2cabf71d1a737da99 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 17 Jul 2022 15:41:48 +0100 Subject: [PATCH] custom_scripts: ensure usr-is-merged/usrmerge does not fail the migration test The new usr-is-merged metapackage intentionally fails to install on systems that are not merged-usr, unless a specific override flag is passed. usrmerge does a live-upgrade of the chroot, which piuparts does not expect. Use the skip flag, so that migration is not blocked. Debootstrap will start using this flag once the package is available in testing. For details see: https://sources.debian.org/src/usrmerge/27/debian/README.Debian/#L66 and: https://lists.debian.org/debian-ctte/2022/07/msg00019.html --- custom-scripts/scripts/post_purge_exceptions | 7 +++++++ custom-scripts/scripts/pre_install_exceptions | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/custom-scripts/scripts/post_purge_exceptions b/custom-scripts/scripts/post_purge_exceptions index cf97dbb0..a1dd47e2 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 5b7c5eca..91ae5b5f 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 -- GitLab