summaryrefslogtreecommitdiff
path: root/src/pkgbuild-check-licenses
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/pkgbuild-check-licenses
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/pkgbuild-check-licenses')
-rwxr-xr-xsrc/pkgbuild-check-licenses8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/pkgbuild-check-licenses b/src/pkgbuild-check-licenses
index 846a6e4..c6c8132 100755
--- a/src/pkgbuild-check-licenses
+++ b/src/pkgbuild-check-licenses
@@ -24,19 +24,13 @@
. libremessages
-# Unset any PKGBUILD variables inherited from the environment
-# I took these from makepkg 4.1.1-1
-unset pkgname pkgbase pkgver pkgrel epoch pkgdesc url license groups provides
-unset md5sums replaces depends conflicts backup source install changelog build
-unset makedepends optdepends options noextract
-
# Usage: check_deps $pkgbuild
# Check whether a PKGBUILD package depends on non-free packages
check_licenses() (
# Note that we use () instead of {} for this function; so that variables
# from the PKBUILD don't bubble up
local pkgbuild=$1
- . "$pkgbuild"
+ load_PKGBUILD "$pkgbuild"
if [[ -z $pkgname ]]; then
return $_E_ERROR # not a PKGBUILD
fi