From 81ac20e7f2cbe84d76f948e961abac36a17c2e6f Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Thu, 1 Feb 2024 07:56:13 +0100 Subject: [PATCH] install-copr-packages to download SRPMs --- .../setup-playbook/files/install-copr-packages | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mock/integration-tests/setup-playbook/files/install-copr-packages b/mock/integration-tests/setup-playbook/files/install-copr-packages index 4cd6f2622..2847499d7 100755 --- a/mock/integration-tests/setup-playbook/files/install-copr-packages +++ b/mock/integration-tests/setup-playbook/files/install-copr-packages @@ -11,6 +11,7 @@ # TODO: DNF5/YUM compat? DNF=/usr/bin/dnf-3 REPOQUERY=( "$DNF" repoquery ) +DOWNLOAD=( "$DNF" download ) copr_dir=$1 ; shift commit=$1 ; shift @@ -93,6 +94,13 @@ for pkg; do done done -cmd=( "$DNF" -y install "${nvrs[@]}" "${repos[@]}" --nogpgcheck ) +if test -n "$SRPM_DOWNLOAD_DIR"; then + mkdir -p "$SRPM_DOWNLOAD_DIR" + cmd=( "${DOWNLOAD[@]}" "${repos[@]}" '--disablerepo=*' --enablerepo xyztest + "${nvrs[@]}" --source --downloaddir "$SRPM_DOWNLOAD_DIR" ) +else + cmd=( "$DNF" -y install "${nvrs[@]}" "${repos[@]}" --nogpgcheck ) +fi + info "Running: ${cmd[*]}" "${cmd[@]}"