Skip to content
Snippets Groups Projects
Verified Commit b8bf133b authored by Christian Heusel's avatar Christian Heusel :rocket:
Browse files

fix(pkgctl clone): fix --maintainer and --universe being stuck

Anything that requires user input (such as a key unlock or hostkey verify) will block the terminal and wait for input which will never come.
We therefore handle just the first element without parallel so these things can easily be done.
Afterwards users are expected to either have setup a ssh ControlMaster or use something like a ssh agent.

fixes archlinux/devtools#148



Signed-off-by: default avatarChristian Heusel <christian@heusel.eu>
parent 5f4fd52e
No related branches found
No related tags found
No related merge requests found
Pipeline #76172 passed
......@@ -61,7 +61,9 @@ pkgctl_repo_clone() {
jobs=$(nproc)
# variables
local command=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
local command
# split the words in _DEVTOOLS_COMMAND to array members
read -ra command <<< "${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}"
local project_path
while (( $# )); do
......@@ -169,9 +171,11 @@ pkgctl_repo_clone() {
fi
# assign command options
if [[ -n "${VERSION}" ]]; then
command+=" --switch '${VERSION}'"
command+=("--switch" "'${VERSION}'")
fi
if ! parallel --bar --jobs "${jobs}" "${command}" ::: "${pkgbases[@]}"; then
# we clone the first element separately to prevent problems with key unlocking etc.
if ! "${command[@]}" "${pkgbases[0]}" || ! parallel --bar --jobs "${jobs}" "${command[@]}" ::: "${pkgbases[@]:1}"; then
die 'Failed to clone some packages, please check the output'
exit 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment