xbps-src: piping with tee(1) and groupping command is not possible sometimes...
This commit is contained in:
parent
15ba67666d
commit
f6a0806229
|
@ -72,10 +72,9 @@ build_src_phase()
|
|||
#
|
||||
# Build package via make.
|
||||
#
|
||||
{ ${make_cmd} ${makejobs} ${make_build_args} \
|
||||
${make_build_target} \
|
||||
2>&1 | tee ${wrksrc}/.xbps_make_build.log; } || \
|
||||
msg_error "$pkgname: build phase failed! check $wrksrc/.xbps_make_build.log"
|
||||
${make_cmd} ${makejobs} ${make_build_args} \
|
||||
${make_build_target} ||
|
||||
msg_error "$pkgname: build phase failed!"
|
||||
fi
|
||||
|
||||
# Run post_build func.
|
||||
|
|
|
@ -33,9 +33,10 @@ set_build_vars()
|
|||
if [ -z "$in_chroot" ]; then
|
||||
SAVE_LDLIBPATH=$LD_LIBRARY_PATH
|
||||
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
|
||||
LD_LIBRARY_PATH="$LDLIBPATH:$XBPS_MASTERDIR/usr/lib:$LD_LIBRARY_PATH"
|
||||
PKG_CONFIG="$XBPS_MASTERDIR/usr/bin/pkg-config"
|
||||
PKG_CONFIG_LIBDIR="$XBPS_MASTERDIR/usr/lib/pkgconfig"
|
||||
LDFLAGS="-L$XBPS_MASTERDIR/usr/lib"
|
||||
|
|
|
@ -237,8 +237,8 @@ xbps_chroot_handler()
|
|||
create_busybox_links
|
||||
install_xbps_utils
|
||||
|
||||
{ MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount; }
|
||||
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper mount
|
||||
[ $? -ne 0 ] && return $?
|
||||
|
||||
if [ -n "$XBPS_PREFER_BINPKG_DEPS" ]; then
|
||||
|
@ -266,8 +266,8 @@ xbps_chroot_handler()
|
|||
fi
|
||||
|
||||
msg_normal "Exiting from the chroot on $XBPS_MASTERDIR."
|
||||
{ MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount; }
|
||||
MASTERDIR="${XBPS_MASTERDIR}" ${sudo_cmd} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount
|
||||
|
||||
return $?
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#-
|
||||
# Copyright (c) 2008-2009 Juan Romero Pardines.
|
||||
# Copyright (c) 2008-2010 Juan Romero Pardines.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
@ -29,7 +29,7 @@
|
|||
#
|
||||
configure_src_phase()
|
||||
{
|
||||
local f lver
|
||||
local f lver error=0
|
||||
|
||||
[ -z $pkgname ] && return 1
|
||||
|
||||
|
@ -83,17 +83,15 @@ configure_src_phase()
|
|||
#
|
||||
# Packages using GNU autoconf
|
||||
#
|
||||
{ ${configure_script} --prefix=/usr --sysconfdir=/etc \
|
||||
${configure_script} --prefix=/usr --sysconfdir=/etc \
|
||||
--infodir=/usr/share/info --mandir=/usr/share/man \
|
||||
${configure_args} 2>&1 \
|
||||
| tee ${wrksrc}/.xbps_configure.log; } || \
|
||||
msg_error "$pkgname: configure failed! check ${wrksrc}/.xbps_configure.log"
|
||||
${configure_args} || error=$?
|
||||
;;
|
||||
configure)
|
||||
#
|
||||
# Packages using custom configure scripts.
|
||||
#
|
||||
${configure_script} ${configure_args}
|
||||
${configure_script} ${configure_args} || error=$?
|
||||
;;
|
||||
perl-module|perl_module)
|
||||
#
|
||||
|
@ -101,8 +99,7 @@ configure_src_phase()
|
|||
# They are all handled by the helper perl-module.sh.
|
||||
#
|
||||
. $XBPS_HELPERSDIR/perl-module.sh
|
||||
{ perl_module_build $pkgname; } \
|
||||
2>&1 | tee ${wrksrc}/.xbps_configure.log
|
||||
perl_module_build $pkgname || error=$?
|
||||
;;
|
||||
*)
|
||||
#
|
||||
|
@ -113,8 +110,8 @@ configure_src_phase()
|
|||
;;
|
||||
esac
|
||||
|
||||
if [ "$build_style" != "perl_module" -a "$?" -ne 0 ]; then
|
||||
msg_error "building $pkg (configure phase)."
|
||||
if [ "$build_style" != "perl_module" -a "$error" -ne 0 ]; then
|
||||
msg_error "$pkgname: configure stage failed!"
|
||||
fi
|
||||
|
||||
# Run post_configure func.
|
||||
|
|
|
@ -82,25 +82,25 @@ install_pkg()
|
|||
|
||||
if [ ! -f "$XBPS_EXTRACT_DONE" ]; then
|
||||
. $XBPS_SHUTILSDIR/extract_funcs.sh
|
||||
extract_distfiles
|
||||
extract_distfiles || return $?
|
||||
fi
|
||||
|
||||
if [ ! -f "$XBPS_CONFIGURE_DONE" ]; then
|
||||
. $XBPS_SHUTILSDIR/configure_funcs.sh
|
||||
configure_src_phase
|
||||
configure_src_phase || return $?
|
||||
fi
|
||||
|
||||
if [ ! -f "$XBPS_BUILD_DONE" ]; then
|
||||
. $XBPS_SHUTILSDIR/build_funcs.sh
|
||||
build_src_phase
|
||||
build_src_phase || return $?
|
||||
fi
|
||||
|
||||
# Install pkg into destdir.
|
||||
{ env xbps_machine=${xbps_machine} MASTERDIR=${_MASTERDIR} \
|
||||
env xbps_machine=${xbps_machine} MASTERDIR=${_MASTERDIR} \
|
||||
dontrm_builddir=${dontrm_builddir} \
|
||||
${fakeroot_cmd} ${fakeroot_cmd_args} \
|
||||
@@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-doinst-helper \
|
||||
${curpkgn}; } || exit $?
|
||||
${curpkgn} || return $?
|
||||
|
||||
# Always write metadata to package's destdir.
|
||||
. $XBPS_SHUTILSDIR/metadata.sh
|
||||
|
@ -110,7 +110,7 @@ install_pkg()
|
|||
|
||||
# Stow package into masterdir.
|
||||
. $XBPS_SHUTILSDIR/stow_funcs.sh
|
||||
stow_pkg_handler stow
|
||||
stow_pkg_handler stow || return $?
|
||||
}
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue