From b369d323c9859290e2f29c6d07e7f0394ed88cd9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 27 Jun 2013 21:15:00 -0600 Subject: add {load,unset}_PKGBUILD to conf.sh, use it. There are a bunch of caveats to loading a PKGBUILD file. This way it is all done correctly in one place. unset_PKGBUILD unsets any functions and variables that are normally set in a PKGBUILD. The list is far more complete than any existing implementation. load_PKGBUILD loads the file given, or "./PKGBUILD" if none is given. But first it calls unset_PKGBUILD and then sets CARCH. --- src/fullpkg/fullpkg-find | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fullpkg') diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find index d110ff2..9bc647f 100755 --- a/src/fullpkg/fullpkg-find +++ b/src/fullpkg/fullpkg-find @@ -21,7 +21,7 @@ copy_files() { # Copy PKGBUILD and sources cp PKGBUILD "$copydir" ( - source PKGBUILD + load_PKGBUILD for file in "${source[@]}"; do file="${file%%::*}" file="${file##*://*/}" @@ -46,7 +46,7 @@ copy_files() { # Checks ABSROOT and look for target pkg deps. Adds them if not built or outdated. find_deps() { # Check this level - source PKGBUILD + load_PKGBUILD local repo="${repo:-$(guess_repo)}" local pkgbase="${pkgbase:-${pkgname[0]}}" -- cgit v1.2.2