From: Fabian Groffen Date: Sun, 30 Dec 2007 19:16:00 +0000 (-0000) Subject: Zac's USERLAND guessing yields in big problems for Prefix. Prefix users X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=ed51e5c152e039f055125d876f456d16f0d670a3;p=portage.git Zac's USERLAND guessing yields in big problems for Prefix. Prefix users /always/ have a GNU userland. I could reliably make this the case in portage/data.py. In isolated-functions.sh I couldn't. It looks strange to me it's being set there as well. I personally hope that USERLAND can go away some day. Prefix could cater for this in the current FreeBSD case, by simply having an alternative EPREFIX for a number of packages that Portage needs (bash, coreutils, findutils, sed, gawk ...). svn path=/main/branches/prefix/; revision=9125 --- diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index d38125fb1..aed9a9476 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -377,16 +377,22 @@ case "${NOCOLOR:-false}" in ;; esac -if [[ -z ${USERLAND} ]] ; then - case $(uname -s) in - *BSD|DragonFly) - export USERLAND="BSD" - ;; - *) - export USERLAND="GNU" - ;; - esac -fi +# In Prefix every platform has USERLAND=GNU, even FreeBSD. Since I +# don't know how to reliably "figure out" we are in a Prefix instance of +# portage here, I for now disable this check, and hardcode it to GNU. +# Somehow it appears stange to me that this code is in this file, +# non-ebuilds/eclasses should never rely on USERLAND and XARGS, don't they? +#if [[ -z ${USERLAND} ]] ; then +# case $(uname -s) in +# *BSD|DragonFly) +# export USERLAND="BSD" +# ;; +# *) +# export USERLAND="GNU" +# ;; +# esac +#fi +[[ -z ${USERLAND} ]] && USERLAND="GNU" if [[ -z ${XARGS} ]] ; then case ${USERLAND} in diff --git a/pym/portage/data.py b/pym/portage/data.py index fa441d375..b869e2efd 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -12,7 +12,11 @@ bad = create_color_func("BAD") ostype=os.uname()[0] userland = None -if ostype == "DragonFly" or ostype.endswith("BSD"): +# Prefix always has USERLAND=GNU, even on +# FreeBSD, OpenBSD and Darwin (thank the lord!). +# Hopefully this entire USERLAND hack can go once +if portage.const.EPREFIX == "" and + (ostype == "DragonFly" or ostype.endswith("BSD")): userland = "BSD" else: userland = "GNU"