common/xbps-src: change directory before each phase.

fixes #9313.
This commit is contained in:
Enno Boland 2017-11-28 21:21:26 +01:00
parent 768fd97393
commit f5239598d5
No known key found for this signature in database
GPG key ID: D09964719BDE9971

View file

@ -39,14 +39,16 @@ ch_wrksrc() {
run_step() {
local step_name="$1" optional_step="$2" skip_post_hook="$3"
ch_wrksrc
run_pkg_hooks "pre-$step_name"
ch_wrksrc
# Run pre_* Phase
if declare -f "pre_$step_name" >/dev/null; then
ch_wrksrc
run_func "pre_$step_name"
fi
ch_wrksrc
# Run do_* Phase
if declare -f "do_$step_name" >/dev/null; then
run_func "do_$step_name"
@ -67,10 +69,12 @@ run_step() {
# Run post_* Phase
if declare -f "post_$step_name" >/dev/null; then
ch_wrksrc
run_func "post_$step_name"
fi
if ! [ "$skip_post_hook" ]; then
ch_wrksrc
run_pkg_hooks "post-$step_name"
fi
}