Guard the mesa driver swap on its end state

mesa-va-drivers-freeworld Provides mesa-va-drivers, so once the swap has run
once it becomes the only thing providing the name we ask dnf to remove. The
command then resolves to removing and installing the same package in a single
transaction and exits with "conflicting requests", which reported
install-packages as a failed stage on every run after the first even though
the machine was already in the desired state.

The failure also produced misleading output, because dnf explored removing
mesa-dri-drivers and surfaced unrelated complaints from steam, lutris and
tigervnc-server-common.

Check for the freeworld package with rpm -q and skip the swap when it is
already installed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TFG55mJBiH2tV38tXcNzJ9
This commit is contained in:
gib
2026-09-18 11:02:35 -04:00
co-authored by Claude Opus 5
parent 5ebebc8aa2
commit 130137485e
+11 -2
View File
@@ -1405,8 +1405,17 @@ soft "the multimedia group update" \
sync
log "Swapping ffmpeg-free for ffmpeg"
soft "the ffmpeg swap" sudo dnf swap -y 'ffmpeg-free' 'ffmpeg' --allowerasing
log "Swapping mesa-va-drivers for mesa-va-drivers-freeworld"
soft "the mesa driver swap" sudo dnf swap -y mesa-va-drivers mesa-va-drivers-freeworld
# mesa-va-drivers-freeworld Provides mesa-va-drivers, so once the swap has been
# done it is the only thing providing the name we ask dnf to remove. `dnf swap`
# then resolves to removing and installing the same package in one transaction
# and fails with "conflicting requests", which reports install-packages as a
# failed stage on every subsequent run. Guard on the end state instead.
if rpm -q mesa-va-drivers-freeworld >/dev/null 2>&1; then
log "mesa-va-drivers-freeworld is already installed; swap not needed"
else
log "Swapping mesa-va-drivers for mesa-va-drivers-freeworld"
soft "the mesa driver swap" sudo dnf swap -y mesa-va-drivers mesa-va-drivers-freeworld
fi
log "Upgrading Multimedia group with optional packages"
soft "the optional Multimedia upgrade" sudo dnf4 group upgrade -y --with-optional Multimedia
log "Installing GStreamer plugins (bad, good, base)"