Commit 542b9cf4 authored by Natanael Copa's avatar Natanael Copa

abuild: dont run build() in fakeroot if package() exist

fakeroot seems do some kind of locking which kills performance on
multicores processors. We can run "make" and "make install" in 2 steps
with only hte latter in fakeroot.
parent 24a42d66
...@@ -619,11 +619,22 @@ dev() { ...@@ -619,11 +619,22 @@ dev() {
default_dev default_dev
} }
is_function() {
type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function"
}
# build and package in fakeroot # build and package in fakeroot
rootpkg() { rootpkg() {
local do_build=build
cd "$startdir"
if is_function package; then
msg "Building without fakeroot"
build || return 1
do_build=
fi
cd "$startdir" cd "$startdir"
msg "Entering fakeroot..." msg "Entering fakeroot..."
fakeroot $0 build prepare_subpackages prepare_package create_apks fakeroot $0 $do_build prepare_subpackages prepare_package create_apks
} }
srcpkg() { srcpkg() {
......
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