* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/unprivileged/
@ 2012-10-01 1:11 Zac Medico
0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2012-10-01 1:11 UTC (permalink / raw
To: gentoo-commits
commit: 7ac850b51f80258b6e9a852ac1807d6b3313cce0
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 1 01:11:41 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 1 01:11:41 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7ac850b5
unprivileged/chown: handle zero args specially
Makefiles and whatnot seem to have a habit of calling chown with zero
args, so fail normally in this case.
---
bin/ebuild-helpers/unprivileged/chown | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/bin/ebuild-helpers/unprivileged/chown b/bin/ebuild-helpers/unprivileged/chown
index cad34d9..fc99339 100755
--- a/bin/ebuild-helpers/unprivileged/chown
+++ b/bin/ebuild-helpers/unprivileged/chown
@@ -13,6 +13,12 @@ for path in ${PATH}; do
IFS=$' \t\n'
output=$("${path}/${scriptname}" "$@" 2>&1)
if [[ $? -ne 0 ]] ; then
+ if [[ $# -eq 0 ]]; then
+ # Makefiles and whatnot seem to have a habit of calling
+ # chown with zero args, so fail normally in this case.
+ echo "${output}" 1>&2
+ exit 1
+ fi
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
if ! ___eapi_has_prefix_variables; then
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/unprivileged/
@ 2013-09-09 21:43 Zac Medico
0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2013-09-09 21:43 UTC (permalink / raw
To: gentoo-commits
commit: 67979d49c7c3d99c95b99994015150c92ce2d21d
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 9 21:43:02 2013 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 9 21:43:02 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=67979d49
unprivileged/chown: fix bug #470992
---
bin/ebuild-helpers/unprivileged/chown | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bin/ebuild-helpers/unprivileged/chown b/bin/ebuild-helpers/unprivileged/chown
index cad34d9..08fa650 100755
--- a/bin/ebuild-helpers/unprivileged/chown
+++ b/bin/ebuild-helpers/unprivileged/chown
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2012 Gentoo Foundation
+# Copyright 2012-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
scriptpath=${BASH_SOURCE[0]}
@@ -13,6 +13,14 @@ for path in ${PATH}; do
IFS=$' \t\n'
output=$("${path}/${scriptname}" "$@" 2>&1)
if [[ $? -ne 0 ]] ; then
+
+ # Avoid an extreme performance problem when the
+ # output is very long (bug #470992).
+ if [[ $(wc -l <<< "${output}") -gt 100 ]]; then
+ output=$(head -n100 <<< "${output}")
+ output="${output}\n ... (further messages truncated)"
+ fi
+
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
if ! ___eapi_has_prefix_variables; then
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-09 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01 1:11 [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/unprivileged/ Zac Medico
-- strict thread matches above, loose matches on Subject: below --
2013-09-09 21:43 Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox