Skip to content

Commit 23760a7

Browse files
authored
Workaround missing --json in "dnf repolist" (#1377)
Fixes #1376
1 parent 62b0b3c commit 23760a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/perf/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function build_test_suite() {
107107
# Install and enable the repository that provides the LLVM Toolchain
108108
if [[ -n "${COPR_PROJECT}" ]]; then
109109
dnf copr enable -y ${COPR_OWNER}/${COPR_PROJECT} ${CHROOT}
110-
local repo_file=$(dnf repoinfo --json *${COPR_PROJECT}* | jq -r ".[0].repo_file_path")
110+
local repo_file=$(dnf repoinfo '*${COPR_PROJECT}*' 2>/dev/null | grep -ioP 'Repo-filename\s*:\s*\K.*' | head -n1)
111111
distname=$(rpm --eval "%{?fedora:fedora}%{?rhel:rhel}")
112112
sed -i "s/\$distname/$distname/g" $repo_file
113113

0 commit comments

Comments
 (0)