diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 16:33:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 16:33:13 +0000 |
commit | 8deeb28d911a5275e2c2f7383a22f4f997d848bc (patch) | |
tree | 3da8a2ad5ebf1e151aa2b736965b4cc18f9fca75 /debian | |
parent | Adding debian version 20211009-21. (diff) | |
download | bfh-metapackages-8deeb28d911a5275e2c2f7383a22f4f997d848bc.tar.xz bfh-metapackages-8deeb28d911a5275e2c2f7383a22f4f997d848bc.zip |
Adding debian version 20211009-22.debian/20211009-22
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/bfh-container.postrm | 6 | ||||
-rwxr-xr-x | debian/bfh-container.preinst | 39 | ||||
-rw-r--r-- | debian/changelog | 10 |
3 files changed, 50 insertions, 5 deletions
diff --git a/debian/bfh-container.postrm b/debian/bfh-container.postrm index ec69346..0af1095 100755 --- a/debian/bfh-container.postrm +++ b/debian/bfh-container.postrm @@ -6,12 +6,12 @@ case "${1}" in remove) for FILE in halt poweroff reboot shutdown coldreboot do - dpkg-divert --package bfh-container --quiet --remove --rename --divert /lib/container/divert/${FILE}.orig /sbin/${FILE} + dpkg-divert --package bfh-container --quiet --remove --rename --divert "/lib/container/divert/${FILE}.orig.usr-is-merged" "/sbin/${FILE}" done - for FILE in pm-hibernate pm-suspend pm-suspend-hybrid + for FILE in halt poweroff reboot shutdown coldreboot pm-hibernate pm-suspend pm-suspend-hybrid do - dpkg-divert --package bfh-container --quiet --remove --rename --divert /lib/container/divert/${FILE}.orig /usr/sbin/${FILE} + dpkg-divert --package bfh-container --quiet --remove --rename --divert "/usr/lib/container/divert/${FILE}.orig" "/usr/sbin/${FILE}" done ;; diff --git a/debian/bfh-container.preinst b/debian/bfh-container.preinst index 335d160..ab15a9c 100755 --- a/debian/bfh-container.preinst +++ b/debian/bfh-container.preinst @@ -8,12 +8,47 @@ case "${1}" in for FILE in halt poweroff reboot shutdown coldreboot do - dpkg-divert --package bfh-container --quiet --add --rename --divert /lib/container/divert/${FILE}.orig /sbin/${FILE} + TRUENAME_USR="$(dpkg-divert --truename "/usr/sbin/${FILE}")" + TRUENAME_ALIAS="$(dpkg-divert --truename "/sbin/${FILE}")" + RENAME_FLAG="--no-rename" + + if [ "${TRUENAME_USR}" = "/usr/sbin/${FILE}" ] + then + if [ "${TRUENAME_ALIAS}" = "/sbin/${FILE}" ] + then + RENAME_FLAG="--rename" + fi + + dpkg-divert --package bfh-container --quiet --add "${RENAME_FLAG}" --divert "/usr/lib/container/divert/${FILE}.orig" "/usr/sbin/${FILE}" + fi + + # DEP17 M18 duplicated diversion, can be removed after trixie. + if [ "${TRUENAME_ALIAS}" = "/sbin/${FILE}" ] + then + dpkg-divert --package bfh-container --quiet --add "${RENAME_FLAG}" --divert "/lib/container/divert/${FILE}.orig.usr-is-merged" "/sbin/${FILE}" + elif [ "${TRUENAME_ALIAS}" != "/lib/container/divert/${FILE}.orig.usr-is-merged" ] + then + dpkg-divert --package bfh-container --quiet --remove --no-rename "/sbin/${FILE}" + dpkg-divert --package bfh-container --quiet --add --no-rename --divert "/lib/container/divert/${FILE}.orig.usr-is-merged" "/sbin/${FILE}" + + if [ -e "${TRUENAME_ALIAS}" ] || [ -h "${TRUENAME_ALIAS}" ] + then + mv "${TRUENAME_ALIAS}" "/lib/container/divert/${FILE}.orig.usr-is-merged" + fi + fi done for FILE in pm-hibernate pm-suspend pm-suspend-hybrid do - dpkg-divert --package bfh-container --quiet --add --rename --divert /lib/container/divert/${FILE}.orig /usr/sbin/${FILE} + TRUENAME_USR="$(dpkg-divert --truename "/usr/sbin/${FILE}")" + + if [ "${TRUENAME_USR}" = "/lib/container/divert/${FILE}.orig" ] + then + dpkg-divert --package bfh-container --quiet --remove --no-rename "/usr/sbin/${FILE}" + dpkg-divert --package bfh-container --quiet --add --no-rename --divert "/usr/lib/container/divert/${FILE}.orig" "/usr/sbin/${FILE}" + else + dpkg-divert --package bfh-container --quiet --add --rename --divert "/usr/lib/container/divert/${FILE}.orig" "/usr/sbin/${FILE}" + fi done ;; diff --git a/debian/changelog b/debian/changelog index 0338084..d016bc1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +bfh-metapackages (20211009-22) experimental; urgency=medium + + * Uploading to experimental. + * Applying patch from Helmut Grohne <helmut@subdivi.de> to duplicate + diversion via DEP17 M18 (Closes: #1055509). + * Cosmetically harmonizing diversion handling in bfh-container + maintainer scripts for better readability. + + -- Daniel Baumann <daniel.baumann@progress-linux.org> Wed, 20 Dec 2023 11:12:25 +0100 + bfh-metapackages (20211009-21) sid; urgency=medium * Uploading to sid. |