This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=34a0f86af59cea81a8178306a0decdeae5cbade2 commit 34a0f86af59cea81a8178306a0decdeae5cbade2 Author: Guillem Jover <[email protected]> AuthorDate: Fri Mar 24 00:04:14 2023 +0100 debian: Remove no longer needed maintscripts for method renames These renames happened during the 1.22.x cycle, so it is safe now to remove the code. --- debian/dselect.preinst | 50 ------------------------------------------------- debian/dselect.prerm | 51 -------------------------------------------------- 2 files changed, 101 deletions(-) diff --git a/debian/dselect.preinst b/debian/dselect.preinst deleted file mode 100644 index 59d36e90f..000000000 --- a/debian/dselect.preinst +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# See deb-preinst(5). - -set -e - -: "${DPKG_ADMINDIR:=/var/lib/dpkg}" - -# Rename state directories to match renamed method names. -rename_method_state_dir() { - methodoldname="$1" - methodoldopt="$2" - methodnewname="$3" - methodnewopt="$4" - methodsdir="$DPKG_ADMINDIR/methods" - - if [ -d "$methodsdir/$methodoldname" ]; then - if [ -e "$methodsdir/$methodnewname" ]; then - rm -rf "$methodsdir/$methodoldname" - else - if [ -e "$methodsdir/$methodoldname/shvar.$methodoldopt" ]; then - cp -a "$methodsdir/$methodoldname/shvar.$methodoldopt" \ - "$methodsdir/$methodoldname/shvar.$methodnewopt" - fi - mv "$methodsdir/$methodoldname" "$methodsdir/$methodnewname" - rm -f "$methodsdir/$methodnewname/shvar.$methodoldopt" - fi - # Update the currently selected method and option if needed. - sed -i -e "s/^$methodoldname $methodoldopt/$methodnewname $methodnewopt/" \ - "$DPKG_ADMINDIR/cmethopt" - fi -} - -case "$1" in -install|upgrade) - if [ -n "$2" ]; then - rename_method_state_dir disk mounted file file - rename_method_state_dir multicd multi_cd media media - fi - ;; -abort-upgrade) - ;; -*) - echo "$0 called with unknown argument '$1'" 1>&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/dselect.prerm b/debian/dselect.prerm deleted file mode 100644 index 0a49491ec..000000000 --- a/debian/dselect.prerm +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# See deb-prerm(5). - -set -e - -: "${DPKG_ADMINDIR:=/var/lib/dpkg}" - -# Rename state directories to match renamed method names. -rename_method_state_dir() { - methodoldname="$1" - methodoldopt="$2" - methodnewname="$3" - methodnewopt="$4" - methodsdir="$DPKG_ADMINDIR/methods" - - if [ -d "$methodsdir/$methodoldname" ]; then - if [ -e "$methodsdir/$methodnewname" ]; then - rm -rf "$methodsdir/$methodoldname" - else - if [ -e "$methodsdir/$methodoldname/shvar.$methodoldopt" ]; then - cp -a "$methodsdir/$methodoldname/shvar.$methodoldopt" \ - "$methodsdir/$methodoldname/shvar.$methodnewopt" - fi - mv "$methodsdir/$methodoldname" "$methodsdir/$methodnewname" - rm -f "$methodsdir/$methodnewname/shvar.$methodoldopt" - fi - # Update the currently selected method and option if needed. - sed -i -e "s/^$methodoldname $methodoldopt/$methodnewname $methodnewopt/" \ - "$DPKG_ADMINDIR/cmethopt" - fi -} - -case "$1" in -upgrade) - if dpkg --compare-versions "$2" lt 1.21.3; then - # Downgrade - rename_method_state_dir file file disk mounted - rename_method_state_dir media media multicd multi_cd - fi - ;; -deconfigure|remove|failed-upgrade) - ;; -*) - echo "$0 called with unknown argument '$1'" 1>&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 -- Dpkg.Org's dpkg

