public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/unprivileged/
Date: Mon,  1 Oct 2012 01:11:56 +0000 (UTC)	[thread overview]
Message-ID: <1349053901.7ac850b51f80258b6e9a852ac1807d6b3313cce0.zmedico@gentoo> (raw)

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


             reply	other threads:[~2012-10-01  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01  1:11 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-09-09 21:43 [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/unprivileged/ Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349053901.7ac850b51f80258b6e9a852ac1807d6b3313cce0.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox