summaryrefslogtreecommitdiff
path: root/src/abslibre-tools
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-27 21:15:00 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-27 21:15:00 -0600
commitb369d323c9859290e2f29c6d07e7f0394ed88cd9 (patch)
treeb0454d30775d3ab662b9c4c9e4bd24094c98ce19 /src/abslibre-tools
parent81c44824f174eda5f57c396cc7d91e2c97490d93 (diff)
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.
Diffstat (limited to 'src/abslibre-tools')
-rwxr-xr-xsrc/abslibre-tools/libreaddiff7
-rwxr-xr-xsrc/abslibre-tools/librestage2
2 files changed, 2 insertions, 7 deletions
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
diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage
index 6eba8dd..e67e98f 100755
--- a/src/abslibre-tools/librestage
+++ b/src/abslibre-tools/librestage
@@ -63,7 +63,7 @@ main() {
load_files makepkg # for PKGDEST, which is optional
# Load the PKGBUILD
- source ./PKGBUILD
+ load_PKGBUILD
# Now for the main routine.
staged=false