diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-05 13:22:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-05-05 17:39:30 -0400 |
commit | b851af71b71de5207d0b49d73c8fdaf7ba1e3db8 (patch) | |
tree | f269b10bf3f6286a4a653922bf44e5466ecd9e6f /src/abslibre-tools | |
parent | 59b3b8500c6bf484b9b1ccfc2b88d47a9592e0f4 (diff) |
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.
Diffstat (limited to 'src/abslibre-tools')
-rwxr-xr-x | src/abslibre-tools/librestage | 14 |
1 files changed, 9 insertions, 5 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 |