HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //var/lib/dpkg/info/percona-release.postinst
#!/bin/bash
# postinst script for percona-release
#
# see: dh_installdeb(1)
SUPRESSOR="> /dev/null 2>&1"
OLDREPOFILE="/etc/apt/sources.list.d/percona-release.list"

if [ "${PERCONA_DEBUG}" = "1" ]; then
  set -x
  SUPRESSOR=""
fi

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <postinst> `abort-remove'
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
    configure)
      eval "/usr/bin/apt-key add /etc/apt/trusted.gpg.d/percona-keyring.gpg  ${SUPRESSOR}"
      /usr/bin/percona-release enable original release || true
      /usr/bin/percona-release enable prel release || true
      if [[ -f  ${OLDREPOFILE} ]]; then
        mv -f ${OLDREPOFILE} ${OLDREPOFILE}.bak
      fi
      for file in $(find /etc/apt/sources.list.d/ -mmin -3 -type f -iname "percona*.list.bak" -not -iname "*prel-release*"); do
        new_file=$(echo $file | sed 's/.bak//')
	if [[ $new_file != ${OLDREPOFILE} ]]; then
          mv $file $new_file
        fi
      done

cat << EOF
The percona-release package now contains a percona-release script that can enable additional repositories for our newer products.

For example, to enable the Percona Server 8.0 repository use:

  percona-release setup ps80

Note: To avoid conflicts with older product versions, the percona-release setup command may disable our original repository for some products.

For more information, please visit:
  https://www.percona.com/doc/percona-repo-config/percona-release.html

EOF
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.



exit 0