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/abslibre-tools/libreaddiff | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/abslibre-tools/libreaddiff') diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff index fafdada..e31cc7b 100755 --- a/src/abslibre-tools/libreaddiff +++ b/src/abslibre-tools/libreaddiff @@ -68,12 +68,7 @@ except StopIteration: # Needed to not include pkgnames specific to other arches. CARCH=$arch for f in $repo/* ; do - unset pkgname - unset epoch - unset pkgver - unset pkgrel - unset arch - . $f/PKGBUILD || continue + load_PKGBUILD "$f/PKGBUILD" || continue is_here=false for arc in ${arch[@]} ; do if [ "$arc" = "any" -o "$arc" = "$CARCH" ] ; then -- cgit v1.2.2