Skip to content

Fix pkg.group_info expanding dnf environment groups with multi-word member groups (fixes #60276) - #69243

Merged
dwoz merged 3 commits into
saltstack:3006.xfrom
ggiesen:fix-60276-group-info-env-expand
Jun 12, 2026
Merged

dwoz merged 3 commits into
saltstack:3006.xfrom
ggiesen:fix-60276-group-info-env-expand

Conversation

@ggiesen

@ggiesen ggiesen commented May 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes pkg.group_installed / pkg.group_info failing to expand a dnf environment group whose member groups have multi-word display names.

When group_info expands an environment group (e.g. Workstation), it recurses into each member group as "@" + <display name>. dnf cannot resolve "@" + a multi-word name (e.g. @Common NetworkManager submodules) -- it warns on stderr and prints nothing to stdout -- so group_info raised Group '@Common NetworkManager submodules' not found and the whole group install failed.

The fix tries the @ form first (to keep disambiguating single-token group ids, the original reason for the prefix) and falls back to the bare group name when that lookup fails, so multi-word member groups expand.

What issues does this PR fix or reference?

Fixes #60276

Previous Behavior

Installing an environment group (Workstation) on RHEL/AlmaLinux 8/9/10 failed with Group '@Common NetworkManager submodules' not found.

New Behavior

The member group is resolved by its bare name when the @-prefixed lookup fails; the environment group expands and installs.

Scope: dnf4 only

Verified the bug and the fix against real dnf on AlmaLinux 8 (dnf 4.7), 9 (4.14) and 10 (4.20) -- all current EL releases ship dnf4, so this covers EL8/9/10. dnf5 (Fedora, and likely a future EL) changed the group subcommands and output format enough that yumpkg's group handling needs separate work; that is out of scope here and is documented on #60276.

Tests

Added a unit test (tests/pytests/unit/modules/test_yumpkg.py) reproducing an environment group with a multi-word member group. It fails with the exact Group '@...' not found error without the fix and passes with it.

Merge requirements satisfied?

  • Docs
  • Changelog (changelog/60276.fixed.md)
  • Tests written/updated

Commits signed with GPG?

No

When pkg.group_installed/pkg.group_info expands a dnf environment group
(e.g. "Workstation"), it recurses into each member group using "@" + the
group's display name. dnf cannot resolve "@" + a multi-word display name
(e.g. "@common NetworkManager submodules") -- it warns on stderr and
prints nothing to stdout -- so group_info raised "Group '@...' not found"
and the whole group install failed (saltstack#60276).

Fall back to the bare group name when the @-prefixed lookup fails, so
multi-word member groups expand. The @ form is still tried first to keep
disambiguating single-token group ids. This is dnf4 (EL8/9/10); dnf5 group
handling is a separate, larger concern.
@dwoz dwoz added the test:full Run the full test suite label Jun 9, 2026
@dwoz dwoz added this to the Sulphur v3006.26 milestone Jun 9, 2026
@dwoz
dwoz merged commit 8f4acaf into saltstack:3006.x Jun 12, 2026
1223 of 1226 checks passed

This branch was previously deployed

1 inactive deployment
ci — 93f450ba Deployed Jun 12, 2026 by ggiesen via Build Onedir Packages / RPM (x86_64) #23971
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants