xbps-src: multiple improvements to messages and phases.

- Prefix all messages with 'Package 'pkgname (version)': ..." to really
  understand what's going on. Add more messages in some stages...
- Do not run pre/post_{configure,build,install} or do_{build,install} stages
  if they were executed successfully in the past.
This commit is contained in:
Juan RP 2010-05-14 00:07:47 +02:00
parent 85f018289f
commit ceefb18bff
13 changed files with 203 additions and 111 deletions

View file

@ -203,8 +203,8 @@ bootstrap)
. $XBPS_SHUTILSDIR/pkgtarget_funcs.sh
[ ! -d $XBPS_SRCPKGDIR/xbps-base-chroot ] && \
msg_error "Cannot find $XBPS_SRCPKGDIR/xbps-base-chroot directory!"
cd $XBPS_SRCPKGDIR/xbps-base-chroot && setup_tmpl $(basename_cwd)
install_pkg $pkgname
cd $XBPS_SRCPKGDIR/xbps-base-chroot && _ORIGINPKG="$(basename_cwd)"
setup_tmpl ${_ORIGINPKG} && install_pkg $pkgname
;;
build|configure)
. $XBPS_SHUTILSDIR/tmpl_funcs.sh
@ -215,8 +215,8 @@ build|configure)
. $XBPS_SHUTILSDIR/chroot.sh
xbps_chroot_handler $target $(basename_cwd)
else
originpkg="$(basename_cwd)"
setup_tmpl $originpkg
_ORIGINPKG="$(basename_cwd)"
setup_tmpl ${_ORIGINPKG}
# If pkg has dependencies, install them first.
. $XBPS_SHUTILSDIR/pkgtarget_funcs.sh
. $XBPS_SHUTILSDIR/builddep_funcs.sh
@ -226,7 +226,7 @@ build|configure)
exit 1
fi
# All deps were installed, continue with the origin pkg...
setup_tmpl $originpkg
setup_tmpl ${_ORIGINPKG}
. $XBPS_SHUTILSDIR/fetch_funcs.sh
fetch_distfiles
if [ ! -f "$XBPS_EXTRACT_DONE" ]; then
@ -293,12 +293,13 @@ install|install-destdir)
install_destdir_target=no
[ "$target" = "install-destdir" ] && install_destdir_target=yes
_ORIGINPKG="$(basename_cwd)"
if [ -z "$in_chroot" -a -z "$base_chroot" ]; then
. $XBPS_SHUTILSDIR/chroot.sh
xbps_chroot_handler $target $(basename_cwd) $dontrm_builddir
xbps_chroot_handler $target ${_ORIGINPKG} $dontrm_builddir
else
. $XBPS_SHUTILSDIR/pkgtarget_funcs.sh
setup_tmpl $(basename_cwd)
setup_tmpl ${_ORIGINPKG}
install_pkg $pkgname
fi
;;