summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-10-03 11:10:55 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-10-03 11:21:15 +0000
commitdef219994d2dff3c2bd47eee76826dc79e042b2f (patch)
tree4c5a1c9890067304a495c56505e3b53d5ae17d71 /abuild.in
parent015f0f69a873f47cfdaa83ae4b22c800eb11308f (diff)
downloadabuild-def219994d2dff3c2bd47eee76826dc79e042b2f.tar.bz2
abuild-def219994d2dff3c2bd47eee76826dc79e042b2f.tar.xz
abuild: require package() function
make a missing function for package() a hard error. this means we never run build in fakeroot.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in25
1 files changed, 5 insertions, 20 deletions
diff --git a/abuild.in b/abuild.in
index 8a54061..f3ee0d4 100644
--- a/abuild.in
+++ b/abuild.in
@@ -134,7 +134,7 @@ default_sanitycheck() {
if [ $(echo "$pkgdesc" | wc -c) -gt 128 ]; then
die "pkgdesc is too long"
fi
- is_function package || warning "Missing package() function in APKBUILD"
+ is_function package || die "Missing package() function in APKBUILD"
if [ -n "$replaces_priority" ] \
&& ! echo $replaces_priority | egrep -q '^[0-9]+$'; then
@@ -1502,11 +1502,7 @@ create_apks() {
}
build_abuildrepo() {
- local d apk _build=build _check=check_fakeroot
- if ! is_function package; then
- # if package() is missing then build is called from rootpkg
- _build=true
- fi
+ local d apk _check=check_fakeroot
if options_has "!checkroot"; then
_check=check
fi
@@ -1525,7 +1521,6 @@ build_abuildrepo() {
unpack
prepare
mkusers
- $_build
$_check
rootpkg
cleanup $CLEANUP
@@ -1764,17 +1759,11 @@ check_fakeroot() {
# build and package in fakeroot
rootpkg() {
- local _package=package
- if ! is_function package; then
- # if package() is missing then run 'build' in fakeroot instead
- warning "No package() function in APKBUILD"
- _package=build
- fi
cd "$startdir"
rm -rf "$pkgdir"
[ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
do_fakeroot "$abuild_path" $color_opt $keep_build \
- $_package \
+ package \
prepare_subpackages \
prepare_language_packs \
prepare_package \
@@ -2129,18 +2118,14 @@ checksum() {
}
rootbld_actions() {
- local part _build=build _check=check_fakeroot
- if ! is_function package; then
- # if package() is missing then build is called from rootpkg
- _build=true
- fi
+ local part _check=check_fakeroot
if options_has "!checkroot"; then
_check=check
fi
if ! want_check; then
_check=true
fi
- for part in symlinksrc unpack prepare $_build $_check rootpkg; do
+ for part in symlinksrc unpack prepare $_check rootpkg; do
runpart $part
done
}