xbps-src: piping with tee(1) and groupping command is not possible sometimes...

This commit is contained in:
Juan RP 2010-05-08 09:46:23 +02:00
parent 15ba67666d
commit f6a0806229
5 changed files with 24 additions and 27 deletions

View File

@ -72,10 +72,9 @@ build_src_phase()
# #
# Build package via make. # Build package via make.
# #
{ ${make_cmd} ${makejobs} ${make_build_args} \ ${make_cmd} ${makejobs} ${make_build_args} \
${make_build_target} \ ${make_build_target} ||
2>&1 | tee ${wrksrc}/.xbps_make_build.log; } || \ msg_error "$pkgname: build phase failed!"
msg_error "$pkgname: build phase failed! check $wrksrc/.xbps_make_build.log"
fi fi
# Run post_build func. # Run post_build func.

View File

@ -33,9 +33,10 @@ set_build_vars()
if [ -z "$in_chroot" ]; then if [ -z "$in_chroot" ]; then
SAVE_LDLIBPATH=$LD_LIBRARY_PATH SAVE_LDLIBPATH=$LD_LIBRARY_PATH
if [ -d /usr/lib/libfakeroot ]; then if [ -d /usr/lib/libfakeroot ]; then
LDLIBPATH="/usr/lib/libfakeroot" LD_LIBRARY_PATH="/usr/lib/libfakeroot:$XBPS_MASTERDIR/usr/lib"
else
LD_LIBRARY_PATH="$XBPS_MASTERDIR/usr/lib"
fi fi
LD_LIBRARY_PATH="$LDLIBPATH:$XBPS_MASTERDIR/usr/lib:$LD_LIBRARY_PATH"
PKG_CONFIG="$XBPS_MASTERDIR/usr/bin/pkg-config" PKG_CONFIG="$XBPS_MASTERDIR/usr/bin/pkg-config"
PKG_CONFIG_LIBDIR="$XBPS_MASTERDIR/usr/lib/pkgconfig" PKG_CONFIG_LIBDIR="$XBPS_MASTERDIR/usr/lib/pkgconfig"
LDFLAGS="-L$XBPS_MASTERDIR/usr/lib" LDFLAGS="-L$XBPS_MASTERDIR/usr/lib"

View File

@ -237,8 +237,8 @@ xbps_chroot_handler()
create_busybox_links create_busybox_links
install_xbps_utils install_xbps_utils
{ MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \ MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount; } @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
[ $? -ne 0 ] && return $? [ $? -ne 0 ] && return $?
if [ -n "$XBPS_PREFER_BINPKG_DEPS" ]; then if [ -n "$XBPS_PREFER_BINPKG_DEPS" ]; then
@ -266,8 +266,8 @@ xbps_chroot_handler()
fi fi
msg_normal "Exiting from the chroot on $XBPS_MASTERDIR." msg_normal "Exiting from the chroot on $XBPS_MASTERDIR."
{ MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \ MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount; } @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
return $? return $?
} }

View File

@ -1,5 +1,5 @@
#- #-
# Copyright (c) 2008-2009 Juan Romero Pardines. # Copyright (c) 2008-2010 Juan Romero Pardines.
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -29,7 +29,7 @@
# #
configure_src_phase() configure_src_phase()
{ {
local f lver local f lver error=0
[ -z $pkgname ] && return 1 [ -z $pkgname ] && return 1
@ -83,17 +83,15 @@ configure_src_phase()
# #
# Packages using GNU autoconf # Packages using GNU autoconf
# #
{ ${configure_script} --prefix=/usr --sysconfdir=/etc \ ${configure_script} --prefix=/usr --sysconfdir=/etc \
--infodir=/usr/share/info --mandir=/usr/share/man \ --infodir=/usr/share/info --mandir=/usr/share/man \
${configure_args} 2>&1 \ ${configure_args} || error=$?
| tee ${wrksrc}/.xbps_configure.log; } || \
msg_error "$pkgname: configure failed! check ${wrksrc}/.xbps_configure.log"
;; ;;
configure) configure)
# #
# Packages using custom configure scripts. # Packages using custom configure scripts.
# #
${configure_script} ${configure_args} ${configure_script} ${configure_args} || error=$?
;; ;;
perl-module|perl_module) perl-module|perl_module)
# #
@ -101,8 +99,7 @@ configure_src_phase()
# They are all handled by the helper perl-module.sh. # They are all handled by the helper perl-module.sh.
# #
. $XBPS_HELPERSDIR/perl-module.sh . $XBPS_HELPERSDIR/perl-module.sh
{ perl_module_build $pkgname; } \ perl_module_build $pkgname || error=$?
2>&1 | tee ${wrksrc}/.xbps_configure.log
;; ;;
*) *)
# #
@ -113,8 +110,8 @@ configure_src_phase()
;; ;;
esac esac
if [ "$build_style" != "perl_module" -a "$?" -ne 0 ]; then if [ "$build_style" != "perl_module" -a "$error" -ne 0 ]; then
msg_error "building $pkg (configure phase)." msg_error "$pkgname: configure stage failed!"
fi fi
# Run post_configure func. # Run post_configure func.

View File

@ -82,25 +82,25 @@ install_pkg()
if [ ! -f "$XBPS_EXTRACT_DONE" ]; then if [ ! -f "$XBPS_EXTRACT_DONE" ]; then
. $XBPS_SHUTILSDIR/extract_funcs.sh . $XBPS_SHUTILSDIR/extract_funcs.sh
extract_distfiles extract_distfiles || return $?
fi fi
if [ ! -f "$XBPS_CONFIGURE_DONE" ]; then if [ ! -f "$XBPS_CONFIGURE_DONE" ]; then
. $XBPS_SHUTILSDIR/configure_funcs.sh . $XBPS_SHUTILSDIR/configure_funcs.sh
configure_src_phase configure_src_phase || return $?
fi fi
if [ ! -f "$XBPS_BUILD_DONE" ]; then if [ ! -f "$XBPS_BUILD_DONE" ]; then
. $XBPS_SHUTILSDIR/build_funcs.sh . $XBPS_SHUTILSDIR/build_funcs.sh
build_src_phase build_src_phase || return $?
fi fi
# Install pkg into destdir. # Install pkg into destdir.
{ env xbps_machine=${xbps_machine} MASTERDIR=${_MASTERDIR} \ env xbps_machine=${xbps_machine} MASTERDIR=${_MASTERDIR} \
dontrm_builddir=${dontrm_builddir} \ dontrm_builddir=${dontrm_builddir} \
${fakeroot_cmd} ${fakeroot_cmd_args} \ ${fakeroot_cmd} ${fakeroot_cmd_args} \
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-doinst-helper \ @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-doinst-helper \
${curpkgn}; } || exit $? ${curpkgn} || return $?
# Always write metadata to package's destdir. # Always write metadata to package's destdir.
. $XBPS_SHUTILSDIR/metadata.sh . $XBPS_SHUTILSDIR/metadata.sh
@ -110,7 +110,7 @@ install_pkg()
# Stow package into masterdir. # Stow package into masterdir.
. $XBPS_SHUTILSDIR/stow_funcs.sh . $XBPS_SHUTILSDIR/stow_funcs.sh
stow_pkg_handler stow stow_pkg_handler stow || return $?
} }
# #