Skip to content

Commit 4223e7d

Browse files
ryantimwilsonfacebook-github-bot
authored andcommitted
Account for RHEL in dnf5 vs dnf conditional
Summary: The conditional added in the following Github commit did not take RHEL into account: facebook@e86019c. We do this by switching from Centos min version -> EL min version, which includes both RHEL and Centos Also, taking this opportunity to simplify the conditional by using <os>_min_version? helpers from fb_helpers based on Github feedback. Differential Revision: D74013493 fbshipit-source-id: de3fb57adae8e93e5bfccc807e5a56b42afab34e
1 parent ed23573 commit 4223e7d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cookbooks/fb_dnf/recipes/packages.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
python3-libcomps
2929
}
3030

31-
if (node.fedora? && node['platform_version'].to_i >= 41) ||
32-
(node.centos? && node['platform_version'].to_i >= 11) ||
33-
node.eln?
31+
if node.fedora_min_version?(41) || node.el_min_version?(11) || node.eln?
3432
dnf_packages += %w{dnf5 dnf5-plugins}
3533
else
3634
dnf_packages += %w{dnf dnf-plugins-core dnf-utils}

0 commit comments

Comments
 (0)