abuild: remove post_unpack

instead, provide 'update_config_sub' and let aports that needs replace
config.sub call it.
This commit is contained in:
Natanael Copa 2013-07-26 11:40:42 +00:00
parent 8112d2422a
commit cbee419616

View File

@ -493,24 +493,6 @@ unpack() {
default_unpack
}
default_post_unpack() {
local i
options_has "!configsub" && return 0
for i in "$srcdir"/*/configure; do
[ -x "$i" ] || continue
find "${i%/configure}" -name config.sub -o -name config.guess \
| while read f; do
msg "Replacing ${f##*/}"
cp "$datadir"/${f##*/} "$f" || return 1
done
break
done
}
post_unpack() {
default_post_unpack
}
# cleanup source and package dir
clean() {
msg "Cleaning temporary build dirs..."
@ -589,6 +571,13 @@ mkusers() {
done
}
# helper to update config.sub to a recent version
update_config_sub() {
find . -name config.sub | while read f; do
msg "Replacing ${f##*/}"
cp "$datadir"/${f##*/} "$f" || return 1
done
}
runpart() {
local part=$1
@ -1205,8 +1194,7 @@ build_abuildrepo() {
if ! apk_up2date || [ -n "$force" ]; then
logcmd "building $pkgname"
sanitycheck && builddeps && clean && fetch && unpack \
&& post_unpack && prepare && mkusers && $_build \
&& rootpkg \
&& prepare && mkusers && $_build && rootpkg \
|| return 1
fi
update_abuildrepo_index