From b40bba5da3f36143b3c6b1182221ca27c784ae9f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 1 Jul 2014 13:36:12 -0400 Subject: librestage: Also stage -debug packages. You might want to "ignore whitespace" when looking at this diff. --- src/abslibre-tools/librestage | 46 ++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 8ea3b53..234f907 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -78,30 +78,32 @@ main() { slock 8 "${WORKDIR}/staging.lock" \ 'Waiting for a shared lock on the staging directory' for CARCH in "${ARCHES[@]}" any; do - for _pkgname in "${pkgname[@]}"; do - if ! pkgfile=$(find_cached_package "$_pkgname" "$(get_full_version "$_pkgname")" "$CARCH"); then - continue - fi + for _basepkgname in "${pkgname[@]}"; do + for _pkgname in "${_basepkgname}" "${_basepkgname}-debug"; do + if ! pkgfile=$(find_cached_package "$_pkgname" "$(get_full_version "$_pkgname")" "$CARCH"); then + continue + fi - msg 'Found package: %s' "${pkgfile##*/}" + msg 'Found package: %s' "${pkgfile##*/}" - canonical="" # is empty for the first iteration, set after that - for repo in "${repos[@]}"; do - xbs release "$repo" "$CARCH" - mkdir -p "${WORKDIR}/staging/${repo}" - if [[ -z $canonical ]]; then - canonical="${WORKDIR}/staging/${repo}/${pkgfile##*/}" - cmd=(cp "$pkgfile" "$canonical") - else - cmd=(ln "$canonical" "${WORKDIR}/staging/${repo}/${pkgfile##*/}") - fi - if "${cmd[@]}"; then - msg2 "%s staged on [%s]" "$_pkgname" "$repo" - staged=true - else - error "Can't put %s on [%s]" "$_pkgname" "$repo" - return 1 - fi + canonical="" # is empty for the first iteration, set after that + for repo in "${repos[@]}"; do + xbs release "$repo" "$CARCH" + mkdir -p "${WORKDIR}/staging/${repo}" + if [[ -z $canonical ]]; then + canonical="${WORKDIR}/staging/${repo}/${pkgfile##*/}" + cmd=(cp "$pkgfile" "$canonical") + else + cmd=(ln "$canonical" "${WORKDIR}/staging/${repo}/${pkgfile##*/}") + fi + if "${cmd[@]}"; then + msg2 "%s staged on [%s]" "$_pkgname" "$repo" + staged=true + else + error "Can't put %s on [%s]" "$_pkgname" "$repo" + return 1 + fi + done done done done -- cgit v1.2.2