Bug 2022584

Summary: dnf swap wireplumber pipewire-media-session no longer works
Product: [Fedora] Fedora Reporter: Peter Hutterer <peter.hutterer>
Component: wireplumberAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: ngompa13, peter.hutterer, wtaymans
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-22 01:20:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Hutterer 2021-11-12 04:42:14 UTC
Description of problem:
Upstream wireplumber and pipewire-media-session now ship with a systemd service alias for pipewire-session-manager.service. This is enabled on install using %systemd_user_post and creates the required symlink in /etc/. That symlink is removed during %postun again.

When running `dnf swap` between wireplumber or pipewire-media-session, the new package's %post gets installed *before* %postun is called on the to-be-removed package. This causes an error and the new package is now missing the symlink:

    Failed to preset unit, file /etc/systemd/user/pipewire-session-manager.service already exists and is a symlink to /usr/lib/systemd/user/pipewire-media-session.service.


The pipewire-pulse.service Wants that symlink in place.


How reproducible:

Either one of the below, whichever one applies:
  dnf swap wireplumber pipewire-media-session
  dnf swap pipewire-media-session wireplumber


Additional info:

Note that a dnf reinstall will apparently not trigger %post, I had to remove and re-install the package to test swapping in the other direction.

Comment 1 Peter Hutterer 2021-11-12 04:44:24 UTC
AFAICT from my testing, moving %systemd_user_post from %post to %posttrans in both spec files does the job. Now the old package is removed before the new one is enabled.

Neal, is that correct or are there any side-effects I didn't think of?

Comment 2 Fedora Update System 2021-11-19 19:09:12 UTC
FEDORA-2021-24a11975fe has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-24a11975fe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-24a11975fe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2021-11-20 16:46:43 UTC
FEDORA-2021-24a11975fe has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-24a11975fe

Comment 4 Fedora Update System 2021-11-21 01:16:24 UTC
FEDORA-2021-24a11975fe has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-24a11975fe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-24a11975fe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-11-22 01:20:29 UTC
FEDORA-2021-24a11975fe has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.