From c3a6e5fa897533274077b7573a6d2a302011be68 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 29 Dec 2007 11:38:48 +0000 Subject: [PATCH] Move XARGS initialization from portage.data to isolated-functions.sh. (trunk r9095:9097) svn path=/main/branches/2.1.2/; revision=9098 --- bin/isolated-functions.sh | 11 +++++++++++ pym/portage.py | 2 +- pym/portage_data.py | 3 --- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index e06fbb826..3290654a6 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -375,6 +375,17 @@ case "${NOCOLOR:-false}" in ;; esac +if [[ -z ${XARGS} ]] ; then + case ${USERLAND} in + BSD|Darwin) + export XARGS="xargs" + ;; + *) + export XARGS="xargs -r" + ;; + esac +fi + has() { hasq "$@" } diff --git a/pym/portage.py b/pym/portage.py index 4524c049b..7b7a5bead 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -4508,7 +4508,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, if env_stat: mysettings._filter_calling_env = True else: - for var in "ARCH", "USERLAND", "XARGS": + for var in "ARCH", "USERLAND": value = mysettings.get(var) if value and value.strip(): continue diff --git a/pym/portage_data.py b/pym/portage_data.py index 5cb88b385..3421d9b9d 100644 --- a/pym/portage_data.py +++ b/pym/portage_data.py @@ -20,15 +20,12 @@ if ostype == "Linux" or \ ostype.lower().startswith("gnu") or \ ostype.lower().endswith("gnu"): userland="GNU" - os.environ["XARGS"]="xargs -r" elif ostype == "Darwin": userland="Darwin" - os.environ["XARGS"]="xargs" def lchown(*pos_args, **key_args): pass elif ostype.endswith("BSD") or ostype =="DragonFly": userland="BSD" - os.environ["XARGS"]="xargs" if not lchown: if "lchown" in dir(os): -- 2.26.2