[pve-devel] [PATCH manager 09/15] postinst: combine abort-* cases and let #DEBHELPER# handle them

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Mar 6 12:10:56 CET 2018


there is nothing DEBHELPER related in this commit AFAICT?

removing all that cruft/boilerplate is a good idea though :)

On Wed, Jan 24, 2018 at 02:12:34PM +0100, Thomas Lamprecht wrote:
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>  debian/postinst | 27 +--------------------------
>  1 file changed, 1 insertion(+), 26 deletions(-)
> 
> diff --git a/debian/postinst b/debian/postinst
> index 2d897d89..cdec8a20 100755
> --- a/debian/postinst
> +++ b/debian/postinst
> @@ -142,35 +142,10 @@ EOF
>        fi
>  
>      fi ;;
> -  abort-upgrade)
> -    # Back out of an attempt to upgrade this package FROM THIS VERSION
> -    # to version $2.  Undo the effects of "prerm upgrade $2".
> -    :
>  
> +  abort-upgrade|abort-remove|abort-deconfigure)
>      ;;
> -  abort-remove)
> -    if test "$2" != in-favour; then
> -      echo "$0: undocumented call to \`postinst $*'" 1>&2
> -      exit 0
> -    fi
> -    # Back out of an attempt to remove this package, which was due to
> -    # a conflict with package $3 (version $4).  Undo the effects of
> -    # "prerm remove in-favour $3 $4".
> -    :
>  
> -    ;;
> -  abort-deconfigure)
> -    if test "$2" != in-favour -o "$5" != removing; then
> -      echo "$0: undocumented call to \`postinst $*'" 1>&2
> -      exit 0
> -    fi
> -    # Back out of an attempt to deconfigure this package, which was
> -    # due to package $6 (version $7) which we depend on being removed
> -    # to make way for package $3 (version $4).  Undo the effects of
> -    # "prerm deconfigure in-favour $3 $4 removing $6 $7".
> -    :
> -
> -    ;;
>    *) echo "$0: didn't understand being called with \`$1'" 1>&2
>       exit 0;;
>  esac
> -- 
> 2.14.2
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list