ci: improve package manager support in fedora.sh
PATCH 1/2 ci: improve package manager support in fedora.sh
Enhance Fedora CI script to support multiple versions of DNF. Prefer dnf5 if available, which supports the --skip-unavailable option.
Fallback to dnf or yum based on availability.
This improves compatibility with newer Fedora versions (e.g. Fedora 42+) and prevents failures when unsupported options are passed to older DNF/YUM versions.
Signed-off-by Li Wang <[email protected]>
--- ci/fedora.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
ci/fedora.sh +7 -1
@@ -2,7 +2,13 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (c) 2018-2021 Petr Vorel <[email protected]> -yum="yum -y install --skip-broken" +if command -v dnf5 >/dev/null 2>&1; then + yum="dnf5 -y install --skip-broken --skip-unavailable" +elif command -v dnf >/dev/null 2>&1; then + yum="dnf -y install --skip-broken" +else + yum="yum -y install --skip-broken" +fi $yum \ autoconf \
Signature · 5 lines
2.49.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH 2/2 ci: add gawk package
To get rid of the error from Fedora42 configuration.
CI: https://github.com/wangli5665/ltp/actions/runs/14484013675
Signed-off-by Li Wang <[email protected]>
--- ci/fedora.sh | 1 + 1 file changed, 1 insertion(+)
ci/fedora.sh +1 -0
@@ -15,6 +15,7 @@ $yum \ automake \ make \ clang \ + gawk \ gcc \ git \ findutils \
Signature · 5 lines
2.49.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp