Commit 42df5722 authored by Natanael Copa's avatar Natanael Copa

abuild: check sanity of install scripts

we check early that suffix is valid and that we have a matching
pkgname or subpackage
parent 12897f2d
......@@ -96,7 +96,7 @@ die() {
# check if apkbuild is basicly sane
sanitycheck() {
local i suggestion
local i= j= suggestion=
msg "Checking sanity of $APKBUILD..."
[ -z "$pkgname" ] && die "Missing pkgname in APKBUILD"
[ -z "${pkgname##* *}" ] && die "pkgname contains spaces"
......@@ -121,6 +121,15 @@ sanitycheck() {
[ -z "$CHOST" ] && die "Please set CHOST in /etc/abuild.conf"
for i in $install; do
local n=${i%.*}
local suff=${i#*.}
case "$suff" in
*) die "$i: unknown install script suffix"
if ! subpackages_has "$n" && [ "$n" != "$pkgname" ]; then
die "$i: install script does not match pkgname or any subpackages"
[ -e "$startdir/$i" ] || die "install script $startdir/$i is missing"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment