From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BC4801389F5 for ; Sat, 15 Nov 2014 05:40:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5DC51E0830; Sat, 15 Nov 2014 05:40:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B0D3FE0830 for ; Sat, 15 Nov 2014 05:40:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7CB49340602 for ; Sat, 15 Nov 2014 05:40:06 +0000 (UTC) Received: by oystercatcher.gentoo.org (Postfix, from userid 559) id A707DA2B4; Sat, 15 Nov 2014 05:40:04 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: autotools.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: autotools.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20141115054004.A707DA2B4@oystercatcher.gentoo.org> Date: Sat, 15 Nov 2014 05:40:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d7edd5c3-6ae2-4dc7-a036-15b5ee68693c X-Archives-Hash: c0add9a6c937e55334c9a3f421adad43 vapier 14/11/15 05:40:04 Modified: autotools.eclass Log: eautomake: fix parsing of version output #509786 by Brian Evans Revision Changes Path 1.167 eclass/autotools.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?rev=1.167&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?rev=1.167&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/autotools.eclass?r1=1.166&r2=1.167 Index: autotools.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v retrieving revision 1.166 retrieving revision 1.167 diff -u -r1.166 -r1.167 --- autotools.eclass 15 Nov 2014 05:10:47 -0000 1.166 +++ autotools.eclass 15 Nov 2014 05:40:04 -0000 1.167 @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.166 2014/11/15 05:10:47 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.167 2014/11/15 05:40:04 vapier Exp $ # @ECLASS: autotools.eclass # @MAINTAINER: @@ -354,7 +354,8 @@ done _automake_version() { - autotools_run_tool automake --version 2>/dev/null | sed -n -e '1{s:.*(GNU automake) ::p;q}' + autotools_run_tool --at-output automake --version 2>/dev/null | + sed -n -e '1{s:.*(GNU automake) ::p;q}' } if [[ -z ${makefile_name} ]] ; then @@ -369,8 +370,9 @@ sed -e 's:.*by automake \(.*\) from .*:\1:') if [[ ${installed_automake} != ${used_automake} ]]; then - einfo "Automake used for the package (${used_automake}) differs from" - einfo "the installed version (${installed_automake})." + ewarn "Automake used for the package (${used_automake}) differs from" \ + "the installed version (${installed_automake})." + ewarn "Forcing a full rebuild of the autotools to workaround." eautoreconf return 0 fi @@ -436,19 +438,20 @@ } # @FUNCTION: autotools_run_tool -# @USAGE: [--at-no-fail] [--at-m4flags] [--at-missing] [tool-specific flags] +# @USAGE: [--at-no-fail] [--at-m4flags] [--at-missing] [--at-output] [tool-specific flags] # @INTERNAL # @DESCRIPTION: # Run the specified autotool helper, but do logging and error checking # around it in the process. autotools_run_tool() { # Process our own internal flags first - local autofail=true m4flags=false missing_ok=false + local autofail=true m4flags=false missing_ok=false return_output=false while [[ -n $1 ]] ; do case $1 in --at-no-fail) autofail=false;; --at-m4flags) m4flags=true;; --at-missing) missing_ok=true;; + --at-output) return_output=true;; # whatever is left goes to the actual tool *) break;; esac @@ -482,6 +485,12 @@ set -- "${1}" $(autotools_m4dir_include) "${@:2}" $(autotools_m4sysdir_include) fi + # If the caller wants to probe something, then let them do it directly. + if ${return_output} ; then + "$@" + return + fi + printf "***** $1 *****\n***** PWD: ${PWD}\n***** $*\n\n" > "${STDERR_TARGET}" ebegin "Running $@"