From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1LmwZp-0002Jb-CB for garchives@archives.gentoo.org; Thu, 26 Mar 2009 20:53:25 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75C25E04E6; Thu, 26 Mar 2009 20:53:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 349D4E0500 for ; Thu, 26 Mar 2009 20:53:24 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id D4DD2651A7 for ; Thu, 26 Mar 2009 20:53:23 +0000 (UTC) Received: from grobian by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1LmwZn-00019d-H9 for gentoo-commits@lists.gentoo.org; Thu, 26 Mar 2009 20:53:23 +0000 To: gentoo-commits@lists.gentoo.org From: "Fabian Groffen (grobian)" Subject: [gentoo-commits] portage r13195 - in main/branches/prefix/bin: . ebuild-helpers X-VCS-Repository: portage X-VCS-Revision: 13195 X-VCS-Files: main/branches/prefix/bin/ebuild-helpers/doexe main/branches/prefix/bin/ebuild-helpers/domo main/branches/prefix/bin/ebuild.sh X-VCS-Directories: . ebuild-helpers X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen Content-Type: text/plain; charset=UTF-8 Message-Id: Sender: Fabian Groffen Date: Thu, 26 Mar 2009 20:53:23 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 2bf1bcf3-b303-40ec-b0b2-9bf6dad6ee69 X-Archives-Hash: f79024bb4f7e2ad4ad2929e33f7f36b8 Author: grobian Date: 2009-03-26 20:53:23 +0000 (Thu, 26 Mar 2009) New Revision: 13195 Modified: main/branches/prefix/bin/ebuild-helpers/doexe main/branches/prefix/bin/ebuild-helpers/domo main/branches/prefix/bin/ebuild.sh Log: Merged from trunk -r13180:13184 | 13181 | Remove unused tar_opts variable inside unpack(). Thanks to= | | zmedico | zong_sharo for reporting. = | =20 | 13182 | Fix domo and doexe to return non-zero if there are any = | | zmedico | errors. Thanks to zong_sharo for reporting. = | =20 | 13183 | Move distcc and ccache PATH setup later, after EAPI is = | | zmedico | guaranteed to be known, so that it's possible to do = | | | indepenent EAPI-specific PATH modifications prior to the = | | | distcc/ccache modifications. = | =20 | 13184 | Source bashrc after PATH tweaks inside ebuild_main(). = | | zmedico | = | Modified: main/branches/prefix/bin/ebuild-helpers/doexe =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- main/branches/prefix/bin/ebuild-helpers/doexe 2009-03-26 20:45:18 UTC= (rev 13194) +++ main/branches/prefix/bin/ebuild-helpers/doexe 2009-03-26 20:53:23 UTC= (rev 13195) @@ -14,6 +14,8 @@ install -d "${ED}${_E_EXEDESTTREE_}" fi =20 +ret=3D0 + for x in "$@" ; do if [ -L "${x}" ] ; then cp "${x}" "${T}" @@ -24,6 +26,11 @@ else mysrc=3D"${x}" fi - install $EXEOPTIONS "$mysrc" "$ED$_E_EXEDESTTREE_" || \ + if ! install $EXEOPTIONS "$mysrc" "$ED$_E_EXEDESTTREE_" ; then echo "!!! ${0##*/}: $mysrc does not exist" 1>&2 + false + fi + ((ret+=3D$?)) done + +exit $ret Modified: main/branches/prefix/bin/ebuild-helpers/domo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- main/branches/prefix/bin/ebuild-helpers/domo 2009-03-26 20:45:18 UTC = (rev 13194) +++ main/branches/prefix/bin/ebuild-helpers/domo 2009-03-26 20:53:23 UTC = (rev 13195) @@ -12,6 +12,8 @@ install -d "${ED}${DESTTREE}/share/locale/" fi =20 +ret=3D0 + for x in "$@" ; do if [ -e "${x}" ] ; then mytiny=3D"${x##*/}" @@ -22,5 +24,9 @@ install -m0644 "${x}" "${mydir}/${MOPREFIX}.mo" else echo "!!! ${0##*/}: $x does not exist" 1>&2 + false fi + ((ret+=3D$?)) done + +exit $ret Modified: main/branches/prefix/bin/ebuild.sh =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- main/branches/prefix/bin/ebuild.sh 2009-03-26 20:45:18 UTC (rev 13194= ) +++ main/branches/prefix/bin/ebuild.sh 2009-03-26 20:53:23 UTC (rev 13195= ) @@ -327,7 +327,6 @@ local x local y local myfail - local tar_opts=3D"" local eapi=3D${EAPI:-0} [ -z "$*" ] && die "Nothing passed to the 'unpack' command" =20 @@ -349,7 +348,7 @@ =20 _unpack_tar() { if [ "${y}" =3D=3D "tar" ]; then - $1 -dc "${srcdir}${x}" | tar xof - ${tar_opts} + $1 -dc "$srcdir$x" | tar xof - assert "$myfail" else $1 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail" @@ -359,13 +358,13 @@ myfail=3D"failure unpacking ${x}" case "${x##*.}" in tar) - tar xof "${srcdir}${x}" ${tar_opts} || die "$myfail" + tar xof "$srcdir$x" || die "$myfail" ;; tgz) - tar xozf "${srcdir}${x}" ${tar_opts} || die "$myfail" + tar xozf "$srcdir$x" || die "$myfail" ;; tbz|tbz2) - bzip2 -dc "${srcdir}${x}" | tar xof - ${tar_opts} + bzip2 -dc "$srcdir$x" | tar xof - assert "$myfail" ;; ZIP|zip|jar) @@ -1724,64 +1723,6 @@ # =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D functions end, main = part begins =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D # =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D = =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D= =3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =20 -if [ -n "${EBUILD_SH_ARGS}" ] && \ - ! hasq ${EBUILD_SH_ARGS} clean depend help info nofetch ; then - - if [ "$(id -nu)" =3D=3D "portage" ] ; then - export USER=3Dportage - fi - - if hasq distcc ${FEATURES} ; then - if [ -d "${EPREFIX}"/usr/lib/distcc/bin ]; then - #We can enable distributed compile support - if [ -z "${PATH/*distcc*/}" ]; then - # Remove the other reference. - remove_path_entry "distcc" - fi - export PATH=3D"${EPREFIX}/usr/lib/distcc/bin:${PATH}" - [ ! -z "${DISTCC_LOG}" ] && addwrite "$(dirname ${DISTCC_LOG})" - elif which distcc &>/dev/null; then - if ! hasq distcc $CC; then - export CC=3D"distcc $CC" - fi - if ! hasq distcc $CXX; then - export CXX=3D"distcc $CXX" - fi - fi - fi - - if hasq ccache ${FEATURES} ; then - #We can enable compiler cache support - if [ -z "${PATH/*ccache*/}" ]; then - # Remove the other reference. - remove_path_entry "ccache" - fi - - if [ -d "${EPREFIX}"/usr/lib/ccache/bin ]; then - export PATH=3D"${EPREFIX}/usr/lib/ccache/bin:${PATH}" - elif [ -d "${EPREFIX}"/usr/bin/ccache ]; then - export PATH=3D"${EPREFIX}/usr/bin/ccache:${PATH}" - fi - - [ -z "${CCACHE_DIR}" ] && export CCACHE_DIR=3D"${EPREFIX}/var/tmp/ccac= he" - - addread "${CCACHE_DIR}" - addwrite "${CCACHE_DIR}" - - [ -n "${CCACHE_SIZE}" ] && ccache -M ${CCACHE_SIZE} &> /dev/null - else - # Force configure scripts that automatically detect ccache to respect - # FEATURES=3D"-ccache" - export CCACHE_DISABLE=3D1 - fi - - # XXX: Load up the helper functions. -# for X in @PORTAGE_BASE@/bin/functions/*.sh; do -# source ${X} || die "Failed to source ${X}" -# done - -fi # "$*"!=3D"depend" && "$*"!=3D"clean" && "$*" !=3D "setup" - export SANDBOX_ON=3D"1" export S=3D${WORKDIR}/${P} =20 @@ -1954,11 +1895,47 @@ fi =20 ebuild_main() { - source_all_bashrcs local f x local export_vars=3D"ASFLAGS CCACHE_DIR CCACHE_SIZE CFLAGS CXXFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS" =20 + if ! hasq $EBUILD_SH_ARGS clean depend help info nofetch ; then + + if hasq distcc $FEATURES ; then + if [ -d "${EPREFIX}"/usr/lib/distcc/bin ] ; then + [[ -z ${PATH/*distcc*/} ]] && remove_path_entry distcc + export PATH=3D"${EPREFIX}/usr/lib/distcc/bin:$PATH" + [[ -n $DISTCC_LOG ]] && addwrite "${DISTCC_LOG%/*}" + elif type -P distcc >/dev/null ; then + ! hasq distcc $CC && export CC=3D"distcc $CC" + ! hasq distcc $CXX && export CXX=3D"distcc $CXX" + fi + fi + + if hasq ccache $FEATURES ; then + [[ -z ${PATH/*ccache*/} ]] && remove_path_entry ccache + + if [ -d "${EPREFIX}"/usr/lib/ccache/bin ] ; then + export PATH=3D"${EPREFIX}/usr/lib/ccache/bin:$PATH" + elif [ -d "${EPREFIX}"/usr/bin/ccache ] ; then + export PATH=3D"${EPREFIX}/usr/bin/ccache:$PATH" + fi + + [[ -z $CCACHE_DIR ]] && export CCACHE_DIR=3D"${EPREFIX}"/var/tmp/ccac= he + + addread "$CCACHE_DIR" + addwrite "$CCACHE_DIR" + + [[ -n $CCACHE_SIZE ]] && ccache -M $CCACHE_SIZE &> /dev/null + else + # Force configure scripts that automatically detect ccache to + # respect FEATURES=3D"-ccache". + export CCACHE_DISABLE=3D1 + fi + fi + + source_all_bashrcs + case ${EBUILD_SH_ARGS} in nofetch) ebuild_phase_with_hooks pkg_nofetch