xbps-src: always create logs for configure/build/install stages in $wrksrc.

Fixed -C and install-destdir in the chroot, $# wasn't consistent :-)
This commit is contained in:
Juan RP 2010-05-07 12:25:24 +02:00
parent 9615930eb4
commit 22774084ab
7 changed files with 62 additions and 56 deletions

View file

@ -90,7 +90,7 @@ install_src_phase()
# Run pre_install func.
run_func pre_install 2>${wrksrc}/.xbps_pre_install.log \
|| msg_error "pre_install stage failed!"
|| msg_error "$pkgname: pre_install() failed! check $wrksrc/.xbps_pre_install.log"
msg_normal "Running install phase for $pkgname-$lver."
@ -98,12 +98,12 @@ install_src_phase()
case "$build_style" in
custom-install)
run_func do_install 2>${wrksrc}/.xbps_do_install.log \
|| msg_error "do_install stage failed!"
|| msg_error "$pkgname: do_install() failed! check $wrksrc/.xbps_do_install.log"
;;
python-module)
. $XBPS_HELPERSDIR/python-module.sh
run_func do_install 2>${wrksrc}/.xbps_do_install.log \
|| msg_error "python module install failed!"
|| msg_error "$pkgname: install failed! check $wrksrc/.xbps_do_install.log"
;;
*)
make_install $lver 2>${wrksrc}/.xbps_make_install.log
@ -113,7 +113,7 @@ install_src_phase()
# Run post_install func.
run_func post_install 2>${wrksrc}/.xbps_post_install.log \
|| msg_error "post_install stage failed!"
|| msg_error "$pkgname: post_install() failed! check $wrksrc/.xbps_post_install.log"
# Remove libtool archives by default.
if [ -z "$keep_libtool_archives" ]; then
@ -160,13 +160,13 @@ install_src_phase()
set_tmpl_common_vars
run_func do_install \
2>${wrksrc}/.xbps_do_install_${pkgname}.log || \
msg_error "$pkgname do_install stage failed!"
msg_error "$pkgname: do_install() failed! check $wrksrc/.xbps_do_install_$pkgname.log"
done
#
# Remove $wrksrc if -C not specified.
#
if [ -d "$saved_wrksrc" -a -z "$dontrm_builddir" ]; then
if [ -d "$saved_wrksrc" -a "$dontrm_builddir" = "no" ]; then
rm -rf $saved_wrksrc && \
msg_normal "Removed $sourcepkg-$lver build directory."
fi
@ -192,8 +192,9 @@ make_install()
#
# Install package via make.
#
${make_cmd} ${make_install_target} \
${make_install_args} || msg_error "installing $pkgname-$lver"
{ ${make_cmd} ${make_install_target} ${make_install_args} \
2>&1 | tee $wrksrc/.xbps_make_install.log; } \
|| msg_error "$pkgname: make install failed! check $wrksrc/.xbps_make_install.log"
# Unset build vars.
unset_build_vars