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 1CA1D198005 for ; Sat, 2 Mar 2013 21:42:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C9D5E080B; Sat, 2 Mar 2013 21:41:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 388DBE07F9 for ; Sat, 2 Mar 2013 21:41:51 +0000 (UTC) Received: from pomiocik.lan (77-253-193-205.adsl.inetia.pl [77.253.193.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 6FBA133DCF4; Sat, 2 Mar 2013 21:41:49 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 1/4] multibuild: print only 'public' part of command-line. Date: Sat, 2 Mar 2013 22:42:07 +0100 Message-Id: <1362260530-26141-2-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1362260530-26141-1-git-send-email-mgorny@gentoo.org> References: <20130227224152.6d1293c9@pomiocik.lan> <1362260530-26141-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: ef1e3aac-9fdc-42ef-bed8-ed44e1cfa34f X-Archives-Hash: 8faa0713e5ba1d6fff96e54677b3a94f Shift the unnecessary 'private' commands from the printed commands when executing. That is: python_parallel_foreach_impl foo will print: * pythonX.Y: foo rather than: * pythonX.Y: _multibuild_parallel _python_multibuild_wrapper ... --- gx86/eclass/multibuild.eclass | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gx86/eclass/multibuild.eclass b/gx86/eclass/multibuild.eclass index 1c9058a..1cc33a9 100644 --- a/gx86/eclass/multibuild.eclass +++ b/gx86/eclass/multibuild.eclass @@ -118,12 +118,23 @@ multibuild_foreach_variant() { # redirect_alloc_fd accepts files only. so we need to open # a random file and then reuse the fd for logger process. redirect_alloc_fd log_fd /dev/null + + _multibuild_run() { + # find the first non-private command + local i=1 + while [[ ${!i} == _* ]]; do + (( i += 1 )) + done + + einfo "${v}: running ${@:${i}}" + "${@}" + } + # bash can't handle ${log_fd} in redirections, # we need to use eval to pass fd numbers directly. eval " exec ${log_fd}> >(exec tee -a \"\${T}/build-\${MULTIBUILD_ID}.log\") - einfo \"\${v}: running \${@}\" >&${log_fd} 2>&1 - \"\${@}\" >&${log_fd} 2>&1 + _multibuild_run \"\${@}\" >&${log_fd} 2>&1 lret=\${?} exec ${log_fd}>&- " -- 1.8.1.4