From f2cafa3cb0941be8235025434620adbf5849a432 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Sun, 3 Dec 2023 19:46:09 +0100 Subject: feat(clone): speedup maintainer and universe clone query There is a single endpoint now to list all pkgbases and their current maintainers. Use this endpoint for speeding up the clone of all packages of a maintainer by only issuing a single API call. Component: pkgctl repo clone Signed-off-by: Levente Polyak --- src/lib/common.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/lib/common.sh') diff --git a/src/lib/common.sh b/src/lib/common.sh index 3d1ee56..7589120 100644 --- a/src/lib/common.sh +++ b/src/lib/common.sh @@ -28,6 +28,7 @@ export GIT_PACKAGING_NAMESPACE_ID=11323 export GIT_PACKAGING_URL_SSH="git@${GITLAB_HOST}:${GIT_PACKAGING_NAMESPACE}" export GIT_PACKAGING_URL_HTTPS="https://${GITLAB_HOST}/${GIT_PACKAGING_NAMESPACE}" export PACKAGING_REPO_RELEASE_HOST=repos.archlinux.org +export PKGBASE_MAINTAINER_URL=https://archlinux.org/packages/pkgbase-maintainer # check if messages are to be printed using color if [[ -t 2 && "$TERM" != dumb ]] || [[ ${DEVTOOLS_COLOR} == always ]]; then @@ -53,6 +54,11 @@ stat_done() { printf "${BOLD}done${ALL_OFF}\n" >&2 } +stat_failed() { + # shellcheck disable=2059 + printf "${BOLD}${RED}failed${ALL_OFF}\n" >&2 +} + msg_success() { local msg=$1 local padding @@ -77,6 +83,15 @@ msg_warn() { printf "%s %s\n" "${padding}${YELLOW}!${ALL_OFF}" "${msg}" >&2 } +print_workdir_error() { + if [[ ! -f "${WORKDIR}"/error ]]; then + return + fi + while read -r LINE; do + error '%s' "${LINE}" + done < "${WORKDIR}/error" +} + _setup_workdir=false setup_workdir() { [[ -z ${WORKDIR:-} ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX") -- cgit v1.2.3-54-g00ecf