public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: increase the chances of successful "yum install" runs
@ 2026-09-11 13:21 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:21 UTC (permalink / raw)
  To: git-commits

            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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:21 [tests/selinux] pr775-checkpolicy-revdeps: increase the chances of successful "yum install" runs Milos Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox