Stop installing ffmpeg over ffmpeg-free, which a fresh machine refuses

A clean Fedora Workstation ships ffmpeg-free, and desktop-packages listed
ffmpeg (RPM Fusion). Those two conflict rather than add: dnf will not erase
the preinstalled ffmpeg-free to make room, so the WHOLE desktop transaction
failed to resolve and no desktop package installed. The codec section already
does the trade correctly -- `dnf swap ffmpeg-free ffmpeg --allowerasing` --
so ffmpeg simply does not belong in the eager list. A machine that already
had ffmpeg (every one this repo was ever run on) sailed past this; the first
genuinely fresh Workstation install is what surfaced it.

Also: report_missing false-warned that awk was unavailable. rpm -q
--whatprovides matches a package's named provides, but awk is provided as the
file path /usr/bin/awk (by gawk), which that query misses. Fall back to
command -v so a capability provided by path is not reported as missing.

Found by a fresh-VM certification run, which is exactly the failure mode a
re-run on an already-configured machine cannot reproduce.

Claude-Session: https://claude.ai/code/session_01Epx9ZC1gwm81K3jm9x9CKh
This commit is contained in:
Gabriel Brown
2026-08-23 13:20:42 -04:00
parent 31668619a4
commit c0eee076b4
2 changed files with 14 additions and 4 deletions
+8 -3
View File
@@ -28,9 +28,14 @@ packages_in() {
report_missing() {
local file="$1" name missing=()
for name in $(packages_in "$file"); do
# --whatprovides, because several list entries are capabilities a
# differently-named package satisfies: awk is gawk, wget is wget2-wget.
rpm -q --whatprovides "$name" >/dev/null 2>&1 || missing+=("$name")
# Three ways a list entry can be satisfied: it is a package name
# (rpm -q), a capability another package provides (--whatprovides,
# e.g. wget -> wget2-wget), or a bare command name provided as a file
# path (command -v, e.g. awk -> /usr/bin/awk from gawk, which
# --whatprovides misses because the provide is the path, not the word).
rpm -q --whatprovides "$name" >/dev/null 2>&1 && continue
command -v "$name" >/dev/null 2>&1 && continue
missing+=("$name")
done
(( ${#missing[@]} > 0 )) && log "WARNING: not available on this machine: ${missing[*]}"
return 0