From 0c193126a01dd39e1806fe5cc376e75857d2f22e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 29 Dec 2007 11:30:30 +0000 Subject: [PATCH] Move XARGS initialization from portage.data to isolated-functions.sh. svn path=/main/trunk/; revision=9096 --- bin/isolated-functions.sh | 11 +++++++++++ pym/portage/data.py | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index e06fbb826..3290654a6 100755 --- 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/data.py b/pym/portage/data.py index dc72d6fa2..d50a6752a 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -18,15 +18,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