From b245def72cd67e6475651b12e3313d8011b128bc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 1 May 2017 17:22:26 -0400 Subject: bugfix [2/2]: toru-path --- src/lib/conf.sh.in | 1 + src/toru/toru-path | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in index 63d5cf9..30469ca 100644 --- a/src/lib/conf.sh.in +++ b/src/lib/conf.sh.in @@ -239,4 +239,5 @@ load_PKGBUILD() { unset_PKGBUILD CARCH="$(get_var makepkg CARCH "`uname -m`")" . "$file" + pkgbase=${pkgbase:-${pkgname[0]}} } diff --git a/src/toru/toru-path b/src/toru/toru-path index 2c00bc7..56bea42 100755 --- a/src/toru/toru-path +++ b/src/toru/toru-path @@ -3,7 +3,7 @@ # Copyright (C) 2011-2012 Nicolás Reynolds # Copyright (C) 2012 Michał Masłowski # Copyright (C) 2012 Joshua Ismael Haase Hernández (xihh) -# Copyright (C) 2014 Luke Shumaker +# Copyright (C) 2014-2015, 2017 Luke Shumaker # # License: GNU GPLv3+ # @@ -55,9 +55,8 @@ fullrepos=() for (( i = ${#REPOS[@]}-1 ; i >= 0 ; i-- )); do $VERBOSE && msg "Processing [%s]" "${REPOS[$i]}" - # ABSROOT has trailing slash - if [ -d "${ABSROOT}${REPOS[$i]}" ]; then - fullrepos+=("${ABSROOT}${REPOS[$i]}") + if [ -d "${ABSROOT}/${REPOS[$i]}" ]; then + fullrepos+=("${ABSROOT}/${REPOS[$i]}") fi done @@ -74,7 +73,7 @@ pkgbuilds=($(find "${find_args[@]}")) # Add information from each of the PKGBUILDs to the toru cache. msg "Updating path cache" msg2 "%d PKGBUILDs to update" ${#pkgbuilds[@]} -for pkgbuild in "${pkgbuilds[@]}"; do +for _pkgbuild in "${pkgbuilds[@]}"; do # plain "$_pkgbuild" if ! load_PKGBUILD "${_pkgbuild}" >/dev/null 2>&1; then error "%q contains errors, skipping" "${_pkgbuild}" -- cgit v1.2.3-54-g00ecf