On Thu, 24 Mar 2022 11:18:18 +0100 Ansgar wrote: > I've attached a patch
And as so often that was not true in the first attempt... Ansgar
diff -Nru usrmerge-25/debian/README.Debian usrmerge-25+nmu1/debian/README.Debian --- usrmerge-25/debian/README.Debian 2021-01-16 04:46:02.000000000 +0100 +++ usrmerge-25+nmu1/debian/README.Debian 2022-03-24 10:49:28.000000000 +0100 @@ -59,6 +59,14 @@ If you know that such a package will never be installed, then the directories and the associated symlinks can be safely deleted. +Skip conversion (UNSUPPORTED) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Automatic conversion to the usrmerge layout will be skipped if the file +/etc/usrmerge-unsupported-skip-usrmerge exists. This is only intended to +be used on special-purpose systems such as buildds and will result in a system +no longer supported past the Debian 12 "bookworm" release. + + Removal of this package ~~~~~~~~~~~~~~~~~~~~~~~ The package can be removed once the system has been converted. diff -Nru usrmerge-25/debian/changelog usrmerge-25+nmu1/debian/changelog --- usrmerge-25/debian/changelog 2021-04-27 01:21:48.000000000 +0200 +++ usrmerge-25+nmu1/debian/changelog 2022-03-24 10:49:51.000000000 +0100 @@ -1,3 +1,13 @@ +usrmerge (25+nmu1) UNRELEASED; urgency=medium + + * Add option to skip automatic conversion. This is only intended to be + used on special-purpose systems such as buildds and will result in a + system no longer supported past the Debian 12 "bookworm" release. + * Make postinst fail if conversion did not happen (except if conversion + is skipped due to the new option). + + -- Ansgar <ans...@debian.org> Thu, 24 Mar 2022 10:49:51 +0100 + usrmerge (25) unstable; urgency=medium * Remove prerm, which has not been needed or even possibly used since diff -Nru usrmerge-25/debian/usrmerge.postinst usrmerge-25+nmu1/debian/usrmerge.postinst --- usrmerge-25/debian/usrmerge.postinst 2021-01-16 04:57:03.000000000 +0100 +++ usrmerge-25+nmu1/debian/usrmerge.postinst 2022-03-24 10:47:43.000000000 +0100 @@ -8,6 +8,10 @@ } maybe_convert() { + # Option to skip usrmerge for buildds. Note that such systems will + # be *UNSUPPORTED* in the future. + [ ! -e /etc/usrmerge-unsupported-skip-usrmerge ] || return 0 + # do not try to run the program if the system has already been converted [ "$(readlink -f /lib)" != '/usr/lib' ] || return 0 @@ -25,14 +29,14 @@ db_version 2.0 db_get usrmerge/autoconvert - [ "$RET" = 'true' ] || return 0 + [ "$RET" = 'true' ] || return 1 /usr/lib/usrmerge/convert-usrmerge } case "$1" in configure) - maybe_convert "$@" + maybe_convert "$@" || { echo "E: usrmerge failed." >&2; exit 1; } /usr/lib/usrmerge/convert-etc-shells ;; esac