public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: do not call epelyum when dnf or yum is missing
@ 2026-09-11 13:20 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:20 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 769c99ed4810f40ec028a94ac311c2caecd9b1f4
Author : Milos Malik <mmalik@redhat.com>
Date : 2023-07-17T12:39:22+02:00
Stats : +8/-1 in 2 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/769c99ed4810f40ec028a94ac311c2caecd9b1f4?branch=pr775-checkpolicy-revdeps
Log:
do not call epelyum when dnf or yum is missing
There are environments where neither dnf nor yum are present. In such
environments, it makes no sense to call the epelyum function.
---
diff --git a/selinux-policy/Library/common/lib.sh b/selinux-policy/Library/common/lib.sh
index 7858110..683ecc7 100755
--- a/selinux-policy/Library/common/lib.sh
+++ b/selinux-policy/Library/common/lib.sh
@@ -1548,6 +1548,13 @@ function rlSESatisfyRequires() {
# because that would most likely break the environment or fail
return
fi
+
+ which dnf yum >& /dev/null
+ if [ $? -eq 2 ] ; then
+ rlLog "Neither dnf nor yum is present. Don't know how to install required packages."
+ return
+ fi
+
if [ $# -gt 0 ] ; then
PACKAGE_LIST2="$*"
fi
diff --git a/selinux-policy/systemd-timesyncd-and-similar/runtest.sh b/selinux-policy/systemd-timesyncd-and-similar/runtest.sh
index 4e26325..98aeb41 100755
--- a/selinux-policy/systemd-timesyncd-and-similar/runtest.sh
+++ b/selinux-policy/systemd-timesyncd-and-similar/runtest.sh
@@ -41,7 +41,7 @@ rlJournalStart
rlPhaseStartSetup
rlRun "rlImport 'selinux-policy/common'"
rlSESatisfyRequires
- SERVICE_PACKAGE=`rpm -qf ${FILE_PATH}`
+ SERVICE_PACKAGE=`rpm -qf ${FILE_PATH} | head -n 1`
rlAssertRpm ${PACKAGE}
rlAssertRpm ${PACKAGE}-targeted
rlAssertRpm ${SERVICE_PACKAGE}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:20 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:20 [tests/selinux] pr775-checkpolicy-revdeps: do not call epelyum when dnf or yum is missing Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox