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: do not call epelyum when dnf or yum is missing
Date: Fri, 11 Sep 2026 13:20:52 GMT [thread overview]
Message-ID: <178913285202.1.1147128679379186612.tests-selinux-769c99ed4810@fedoraproject.org> (raw)
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}
reply other threads:[~2026-09-11 13:20 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=178913285202.1.1147128679379186612.tests-selinux-769c99ed4810@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