From b851af71b71de5207d0b49d73c8fdaf7ba1e3db8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 5 May 2017 13:22:12 -0400 Subject: librestage: get the list of arches from the PKGBUILD, not a global conf. Also, pacman-git produces ${pkgbase}-debug packages instead of the ${pkgname}-debug packages that pacman <=5.0.1 produces. This commit adds support for staging both, so we are ready when the new pacman comes out. --- src/abslibre-tools/librestage | 14 +++++++++----- src/libretools.conf | 8 +++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index beeb240..62a3f14 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -61,7 +61,7 @@ main() { # Load configuration load_files libretools - check_vars libretools WORKDIR ARCHES || return 1 + check_vars libretools WORKDIR || return 1 load_files makepkg # for PKGDEST, SRCDEST, and SRCPKGDEST, which are optional load_files librefetch # for MIRRORS, which is optional SRCPKGPOOL="$WORKDIR/staging/sources/parabola" @@ -74,10 +74,14 @@ main() { slock 8 "${WORKDIR}/staging.lock" \ 'Waiting for a shared lock on the staging directory' - # Look for makepkg output - local CARCH _pkgname pkgfile - for CARCH in "${ARCHES[@]}" any; do - for _pkgname in "${pkgname[@]}" "${pkgname[@]/%/-debug}"; do + # Look for (libre)makepkg output + local CARCH _pkgname pkgnames pkgfile + for CARCH in "${arch[@]}"; do + # This supports both pacman <= 5.0.1 pkgname-debug + # packages and pacman-git pkgbase-debug packages. + pkgnames=("${pkgname[@]}" "${pkgname[@]/%/-debug}") + in_array "$pkgbase" "${pkgname[@]}" || pkgnames+=("${pkgbase}-debug") + for _pkgname in "${pkgnames[@]}"; do if ! pkgfile=$(find_cached_package "$_pkgname" "$(get_full_version "$_pkgname")" "$CARCH"); then continue fi diff --git a/src/libretools.conf b/src/libretools.conf index e601465..f909c36 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -16,15 +16,13 @@ BLACKLIST=https://git.parabola.nu/blacklist.git/plain/blacklist.txt # shellcheck disable=2046 DIFFPROG=$(which $([ -z "${DISPLAY:-}" ]||echo kdiff3 meld gvimdiff) vimdiff colordiff diff 2>/dev/null|sed 's/\s.*//;1q') -## The architectures you'll be packaging for -## Used by `librestage`, `xbs-abslibre` -ARCHES=($(printf '%s\n' /usr/share/pacman/defaults/pacman.conf.*|sed 's|.*\.||')) - ## ABSLibre -# Used by xbs-abslibre +## Used by xbs-abslibre ABSLIBRERECV=git://git.parabola.nu/abslibre/abslibre.git ABSLIBRESEND=ssh://git@git.parabola.nu/srv/git/abslibre/abslibre.git ABSLIBREDEST="$WORKDIR/staging/abslibre" +## ARCHES is the list of ARCHES to look for under ABSLIBREDEST +ARCHES=($(printf '%s\n' /usr/share/pacman/defaults/pacman.conf.*|sed 's|.*\.||')) ################################################################################ # librerelease # -- cgit v1.2.2