libvirt group: gate on daemon/virt-manager, not the metapkg #5

Merged
yuri merged 2 commits from fix/libvirt-group-gate into main 2026-10-27 15:58:59 +01:00
Owner

Fresh-VM repro: virt-manager installed but user stayed in yuri+wheel — the gate checked rpm -q libvirt, yet virt-manager only requires libvirt-glib (client-side), never the metapkg.

Gate widened: libvirt, libvirt-daemon, libvirt-daemon-driver-qemu, virt-manager, or /usr/sbin/libvirtd present.

Note: PR #4 was merged mid-diagnosis; this targets main as it now stands (847e766).

Fresh-VM repro: virt-manager installed but user stayed in yuri+wheel — the gate checked `rpm -q libvirt`, yet virt-manager only requires libvirt-glib (client-side), never the metapkg. Gate widened: libvirt, libvirt-daemon, libvirt-daemon-driver-qemu, virt-manager, or /usr/sbin/libvirtd present. Note: PR #4 was merged mid-diagnosis; this targets main as it now stands (847e766).
yuri added 1 commit 2026-10-27 15:32:41 +01:00
Fresh-VM repro: user in yuri+wheel with virt-manager installed. Gate was
'pkg_installed libvirt', but virt-manager does NOT require the 'libvirt'
metapkg (verified vs F44 package page: requires libvirt-glib etc., client
side only) — so the usermod never fired.

Gate now: libvirt OR libvirt-daemon OR libvirt-daemon-driver-qemu OR
virt-manager packages, or an existing /usr/sbin/libvirtd binary.
yuri added 1 commit 2026-10-27 15:50:31 +01:00
Fresh-VM timeline explained: on run 1 virt-manager installs AFTER the
niri module's prereq check ran (menu dispatch order), so the group add
was evaluated against a package state that did not include it yet. A
second run 'fixed' it — matching the observed behavior.

- New ensure_libvirt_group runs in the Summary section, seeing the FINAL
  package state; menu/module-time check kept as an early pass.
- pkg_installed is AND-semantics (all must be installed); the gate needs
  OR. New pkg_installed_any helper; both gates switched to it.
- Also fixed a set -e trap: '$done_any && ok' returned 1 (killing the
  script) when no optional tools were picked — replaced with an if.
All four gate cases harness-proven: virt-only, menu-pick, no-virt,
already-in-group.
yuri merged commit 2b58c4f788 into main 2026-10-27 15:58:59 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yuri/fedora#5