public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: increase the chances of successful "yum install" runs
Date: Fri, 11 Sep 2026 13:21:49 GMT [thread overview]
Message-ID: <178913290971.1.17134264387414676460.tests-selinux-5a7dbcf73373@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 5a7dbcf73373e553a2ed341bf2c7688c6d48c21b
Author : Milos Malik <mmalik@redhat.com>
Date : 2024-07-24T13:21:02+02:00
Stats : +18/-6 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/5a7dbcf73373e553a2ed341bf2c7688c6d48c21b?branch=pr775-checkpolicy-revdeps
Log:
increase the chances of successful "yum install" runs
Package installations via yum can fail for many reasons. For example:
* unsatisfied package dependencies
* repository availability problems
* unrecognized command line options
Hopefully, this change helps the yum command to run successfully
when such issues occur.
---
diff --git a/libselinux/matchpathcon-in-chroot-env/runtest.sh b/libselinux/matchpathcon-in-chroot-env/runtest.sh
index e8c82b7..f68fca2 100755
--- a/libselinux/matchpathcon-in-chroot-env/runtest.sh
+++ b/libselinux/matchpathcon-in-chroot-env/runtest.sh
@@ -30,10 +30,15 @@
PACKAGE="libselinux"
CHROOT_DIR=`mktemp -d`
-if rlIsFedora ; then
- INSTALL_OPTION="--use-host-config"
-else
- INSTALL_OPTION="--disablerepo epel"
+INSTALL_OPTION=""
+if yum --help | grep -q use-host-config ; then
+ INSTALL_OPTION="${INSTALL_OPTION} --use-host-config"
+fi
+if yum install --help | grep -q skip-broken ; then
+ INSTALL_OPTION="${INSTALL_OPTION} --skip-broken"
+fi
+if yum install --help | grep -q skip-unavailable ; then
+ INSTALL_OPTION="${INSTALL_OPTION} --skip-unavailable"
fi
rlJournalStart
diff --git a/libselinux/setfiles-in-chroot-env/runtest.sh b/libselinux/setfiles-in-chroot-env/runtest.sh
index 0dfb100..c626652 100755
--- a/libselinux/setfiles-in-chroot-env/runtest.sh
+++ b/libselinux/setfiles-in-chroot-env/runtest.sh
@@ -30,8 +30,15 @@
PACKAGE="libselinux"
CHROOT_DIR=`mktemp -d`
-if rlIsFedora ; then
- INSTALL_OPTION="--use-host-config"
+INSTALL_OPTION=""
+if yum --help | grep -q use-host-config ; then
+ INSTALL_OPTION="${INSTALL_OPTION} --use-host-config"
+fi
+if yum install --help | grep -q skip-broken ; then
+ INSTALL_OPTION="${INSTALL_OPTION} --skip-broken"
+fi
+if yum install --help | grep -q skip-unavailable ; then
+ INSTALL_OPTION="${INSTALL_OPTION} --skip-unavailable"
fi
rlJournalStart
reply other threads:[~2026-09-11 13:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178913290971.1.17134264387414676460.tests-selinux-5a7dbcf73373@fedoraproject.org \
--to=mmalik@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox