diff options
-rwxr-xr-x | src/dagpkg | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -31,6 +31,18 @@ check_vars libretools FULLBUILDCMD || exit 1 load_files makepkg check_vars makepkg CARCH || exit 1 +# Globals: +# - temp_dir +# - log +# - name (sort of, it's also local to visit_pkgbuild() ) +# - prev +# - I +# - marks +# - various PKGBUILD variables: +# - pkgbase/pkgname +# - epoch/pkgver/pkgrel +# - arch +# - {,make,check}depends # End inmediately but print an useful message trap_exit() { @@ -61,8 +73,9 @@ source_pkgbuild() { unset build package &>/dev/null - for _pkg in ${pkgname[@]}; do - unset package_${_pkg} &>/dev/null || true + local _pkg + for _pkg in "${pkgname[@]}"; do + unset "package_${_pkg}" &>/dev/null || true done # This is the name of the package @@ -117,12 +130,13 @@ visit_pkgbuild() { marks[$name]=1 # Recurse into dependencies - for d in ${depends[@]} ${makedepends[@]}; do + local d + for d in "${depends[@]}" "${makedepends[@]}" "${checkdepends[@]}"; do # Cleanup dependency versions d=$(echo $d | sed "s/[<>=].*//") # Where's the pkgbuild? - w=$(toru-where $d) + local w=$(toru-where $d) # Skip if not available test -z "$w" && continue @@ -160,7 +174,7 @@ nl ${log} | while read order pkg; do fi # where's this package? - w="$(toru-where "$pkg")" + local w="$(toru-where "$pkg")" test -z "$w" && continue # copy to work dir if not already |