aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-07 15:48:00 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-01-07 15:48:00 +0000
commit650d3cec1dfef63ed5a0e32820e5ac0e79cfb4b2 (patch)
treeaed2aa58aeb9b35b66584c6e873b918873c70215
parentaf8ba68ba0a0ded0bec48a22f36220c493e1c4f7 (diff)
downloadpaludis-650d3cec1dfef63ed5a0e32820e5ac0e79cfb4b2.tar.gz
paludis-650d3cec1dfef63ed5a0e32820e5ac0e79cfb4b2.tar.xz
Curb various interactivity abuses
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash6
-rw-r--r--paludis/util/echo_functions.bash.in10
2 files changed, 10 insertions, 6 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index a8ddb5c..aa1b7d0 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -49,6 +49,10 @@ ebuild_sanitise_envvars()
unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE
unset LANG ${!LC_*}
export LC_ALL=C
+
+ # pagers won't run with redirected output, but some naughty packages like
+ # to use them.
+ export PAGER=cat
}
ebuild_sanitise_envvars
diff --git a/paludis/util/echo_functions.bash.in b/paludis/util/echo_functions.bash.in
index 30014b8..029ecde 100644
--- a/paludis/util/echo_functions.bash.in
+++ b/paludis/util/echo_functions.bash.in
@@ -3,7 +3,7 @@
@GENERATED_FILE@
-# Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
+# Copyright (c) 2006, 2007, 2008, 2009, 2010 Ciaran McCreesh
#
# Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -53,8 +53,9 @@ paludis_ecmd()
{
local cmd="$1" hook="$2" prefix="$3" message="$4" newline="$5"
- echo -ne "${prefix}${message}"
- [[ -z "${newline}" ]] && echo
+ # don't try to avoid a newline for einfon. it gets horrible when logging
+ # things, and einfon is abused more than it is used correctly.
+ echo -e "${prefix}${message}"
if type perform_hook &>/dev/null ; then
if [[ -n "${hook}" ]] ; then
@@ -74,8 +75,7 @@ einfon()
"einfon" \
"einfo" \
"`echo -ne " ${COLOUR_GOOD}*${COLOUR_NORMAL} "`" \
- "$*" \
- "no"
+ "$*"
}
einfo()