summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-03-04 19:27:00 +0000
committerMichał Górny <mgorny@gentoo.org>2013-03-04 19:27:00 +0000
commitb456431767c3ff8ec89edd2270d8b92a0f03f7ec (patch)
tree4e796d0182427dd837062d957ef90e5469491186 /eclass
parentUpstream lacks math skills and for them 4.08 is greater than 4.99. Fixes bug ... (diff)
downloadhistorical-b456431767c3ff8ec89edd2270d8b92a0f03f7ec.tar.gz
historical-b456431767c3ff8ec89edd2270d8b92a0f03f7ec.tar.bz2
historical-b456431767c3ff8ec89edd2270d8b92a0f03f7ec.zip
Print only the "public" part of commands.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/multibuild.eclass17
2 files changed, 18 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 96feaccb7b5d..d0e21bfe9c3f 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.706 2013/03/04 19:22:13 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.707 2013/03/04 19:27:00 mgorny Exp $
+
+ 04 Mar 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass:
+ Print only the "public" part of commands.
04 Mar 2013; Michał Górny <mgorny@gentoo.org> multibuild.eclass,
python-r1.eclass:
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 91f6bec86ece..19f0a24796c3 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.2 2013/03/04 19:22:13 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/multibuild.eclass,v 1.3 2013/03/04 19:27:00 mgorny Exp $
# @ECLASS: multibuild
# @MAINTAINER:
@@ -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
+
+ [[ ${i} -le ${#} ]] && 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}>&-
"