Skip to content

Commit

Permalink
install-copr-packages to download SRPMs
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Feb 1, 2024
1 parent f551365 commit 81ac20e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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[@]}"

0 comments on commit 81ac20e

Please sign in to comment.