From 8080818310f4fa09009c60dab82f39a6058f72c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dylan=20A=C3=AFssi?= Date: Wed, 8 Jun 2022 22:31:28 +0200 Subject: [PATCH] Remove pipewire-media-session.service when the package is removed not only when it is purged to avoid conflict with wireplumber. See https://bugs.debian.org/997818 --- debian/changelog | 8 ++++++++ debian/postrm | 16 ++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 debian/postrm diff --git a/debian/changelog b/debian/changelog index 2519754dc..9bc656745 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +pipewire-media-session (0.4.1-4) UNRELEASED; urgency=medium + + * Remove pipewire-media-session.service when the package is removed, + not only when it is purged to avoid conflict with wireplumber. + See https://bugs.debian.org/997818 + + -- Dylan Aïssi Wed, 08 Jun 2022 22:29:22 +0200 + pipewire-media-session (0.4.1-3) unstable; urgency=medium [ Daniel van Vugt ] diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 000000000..fc4d8ae60 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,16 @@ +#!/bin/sh +set -e + +# pipewire-pulse.service wants pipewire-session-manager.service +# pipewire-session-manager.service is an alias from both +# wireplumber.service and pipewire-media-session.service. +# This generates a conflict, see https://bugs.debian.org/997818 +# To avoid this conflict, we need to remove pipewire-media-session.service +# during the remove step of the package, not only at the purge step. + +if [ "$1" = "remove" ]; then + if [ -z "${DPKG_ROOT:-}" ] && [ -x "/usr/bin/deb-systemd-helper" ] ; then + deb-systemd-helper --user purge 'pipewire-media-session.service' >/dev/null || true + deb-systemd-helper --user unmask 'pipewire-media-session.service' >/dev/null || true + fi +fi -- 2.30.2