1 |
commit: 7ac850b51f80258b6e9a852ac1807d6b3313cce0 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 1 01:11:41 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 1 01:11:41 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7ac850b5 |
7 |
|
8 |
unprivileged/chown: handle zero args specially |
9 |
|
10 |
Makefiles and whatnot seem to have a habit of calling chown with zero |
11 |
args, so fail normally in this case. |
12 |
|
13 |
--- |
14 |
bin/ebuild-helpers/unprivileged/chown | 6 ++++++ |
15 |
1 files changed, 6 insertions(+), 0 deletions(-) |
16 |
|
17 |
diff --git a/bin/ebuild-helpers/unprivileged/chown b/bin/ebuild-helpers/unprivileged/chown |
18 |
index cad34d9..fc99339 100755 |
19 |
--- a/bin/ebuild-helpers/unprivileged/chown |
20 |
+++ b/bin/ebuild-helpers/unprivileged/chown |
21 |
@@ -13,6 +13,12 @@ for path in ${PATH}; do |
22 |
IFS=$' \t\n' |
23 |
output=$("${path}/${scriptname}" "$@" 2>&1) |
24 |
if [[ $? -ne 0 ]] ; then |
25 |
+ if [[ $# -eq 0 ]]; then |
26 |
+ # Makefiles and whatnot seem to have a habit of calling |
27 |
+ # chown with zero args, so fail normally in this case. |
28 |
+ echo "${output}" 1>&2 |
29 |
+ exit 1 |
30 |
+ fi |
31 |
source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh |
32 |
|
33 |
if ! ___eapi_has_prefix_variables; then |