fowners: disable in Prefix
authorFabian Groffen <grobian@gentoo.org>
Sun, 29 May 2011 08:10:22 +0000 (10:10 +0200)
committerFabian Groffen <grobian@gentoo.org>
Sun, 29 May 2011 08:10:22 +0000 (10:10 +0200)
Make fowners return success and emit a warning for Prefix users, like
enewuser etc. do.

bin/ebuild-helpers/fowners

index b9491649fa36eca26a7d07f323f08361232d0267..0c5295b78ab60709e1e3a8ac10db1cddb0021228 100755 (executable)
@@ -4,6 +4,11 @@
 
 source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
 
+if hasq prefix ${USE} && [[ $EUID != 0 ]] ; then
+       ewarn "fowners ignored in Prefix with non-privileged user"
+       exit 0
+fi
+
 # we can't prefix all arguments because
 # chown takes random options
 slash="/"