xbps-src: refactor build logic into its own script (build.sh).

The build.sh script is now responsible to handle all the logic to build
a source package and its subpackages, as well as all its required
build dependencies. Thanks to this and subshells, dependencies are now
built into its own child process, creating a process tree that can go
nested as long as your system allows forking and has enough memory :-)

This fixes some issues that have been while building pkgs that have lots
of nested dependencies.
This commit is contained in:
Juan RP 2015-03-14 07:50:05 +01:00
parent 018e0086c4
commit 849d22e46d
10 changed files with 152 additions and 152 deletions

View file

@ -68,14 +68,12 @@ bulk_update() {
done
echo
for f in ${pkgs}; do
BEGIN_INSTALL=1
XBPS_TARGET_PKG="$f"
read_pkg
msg_normal "xbps-src: building ${pkgver} ...\n"
if [ -n "$CHROOT_READY" -a -z "$IN_CHROOT" ]; then
chroot_handler pkg $XBPS_TARGET_PKG
else
install_pkg pkg $XBPS_CROSS_BUILD
$XBPS_LIBEXECDIR/build.sh $f $f pkg $XBPS_CROSS_BUILD || return 1
fi
if [ $? -ne 0 ]; then
msg_error "xbps-src: failed to build $pkgver pkg!\n"
@ -84,6 +82,6 @@ bulk_update() {
if [ -n "$pkgs" -a -n "$args" ]; then
echo
msg_normal "xbps-src: updating your system, confirm to proceed...\n"
${XBPS_SUCMD} "xbps-install --repository=$XBPS_REPOSITORY --repository=$XBPS_REPOSITORY/nonfree -u ${pkgs}"
${XBPS_SUCMD} "xbps-install --repository=$XBPS_REPOSITORY --repository=$XBPS_REPOSITORY/nonfree -u ${pkgs}" || return 1
fi
}