File: podman.postinst

package info (click to toggle)
podman 5.4.2%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 23,124 kB
  • sloc: sh: 6,119; perl: 2,710; python: 2,258; ansic: 1,556; makefile: 1,022; xml: 121; ruby: 42; awk: 12; csh: 8
file content (36 lines) | stat: -rw-r--r-- 1,414 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

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 https://www.debian.org/doc/debian-policy/ or
# the debian-policy package

case "$1" in
    configure)
        # Podman 3.0 dropped the varlink interface, so we need to cleanup
        # the related systemd service, cf. #981708
        if dpkg --compare-versions "$2" le-nl '3.0.0~rc2+dfsg1-3'; then
            deb-systemd-helper purge  io.podman.service io.podman.socket >/dev/null || true
            deb-systemd-helper unmask io.podman.service io.podman.socket >/dev/null || true
        fi

        # podman 5.2.2+ds1-2 moved files to podman-docker, cf. #1083242
        if [ -z "$(dpkg-query -f '${Version}' -W podman-docker 2> /dev/null)" ]; then
            dpkg-maintscript-helper rm_conffile /etc/profile.d/podman-docker.csh 5.2.2+ds1-2 -- "$@"
            dpkg-maintscript-helper rm_conffile /etc/profile.d/podman-docker.sh 5.2.2+ds1-2 -- "$@"
        fi
    ;;
    *)
    ;;
esac

#DEBHELPER#