public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sandbox:master commit in: data/
Date: Mon,  4 Jul 2011 23:06:28 +0000 (UTC)	[thread overview]
Message-ID: <90b5d930ae9163a749b35c3b97f17a010136f976.vapier@gentoo> (raw)

commit:     90b5d930ae9163a749b35c3b97f17a010136f976
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  1 08:41:42 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Mar  1 08:41:42 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sandbox.git;a=commit;h=90b5d930

sandbox.bashrc: support newer /etc/portage files

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 data/sandbox.bashrc |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/data/sandbox.bashrc b/data/sandbox.bashrc
index 39d4d1a..7601d35 100644
--- a/data/sandbox.bashrc
+++ b/data/sandbox.bashrc
@@ -54,15 +54,16 @@ if [[ ${SANDBOX_INTRACTV} == "1" && -t 1 ]] || [[ ${__SANDBOX_TESTING} == "yes"
 		# build area or not ... uNF uNF uNF
 		#sbs_pdir=$(portageq envvar PORTAGE_TMPDIR)/portage/ #portageq takes too long imo
 		if [[ -z ${PORTAGE_TMPDIR} ]] ; then
-			sbs_gpdir=$( source /etc/make.globals && echo $PORTAGE_TMPDIR 2> /dev/null)
-			sbs_cpdir=$( source /etc/make.conf && echo $PORTAGE_TMPDIR 2> /dev/null)
-			[[ -z ${sbs_cpdir} ]] \
-				&& sbs_pdir=${sbs_gpdir} \
-				|| sbs_pdir=${sbs_cpdir}
+			sbs_pdir=$(
+				for f in /etc/{,portage/}make.globals /etc/{,portage/}make.conf ; do
+					[[ -e ${f} ]] && source ${f}
+				done
+				echo $PORTAGE_TMPDIR
+			)
 		else
 			sbs_pdir=${PORTAGE_TMPDIR}
 		fi
-		[[ -z ${sbs_pdir} ]] && sbs_pdir=/var/tmp
+		: ${sbs_pdir:=/var/tmp}
 		sbs_pdir=${sbs_pdir}/portage/
 
 		if [[ ${PWD:0:${#sbs_pdir}} == "${sbs_pdir}" ]] ; then
@@ -85,7 +86,7 @@ if [[ ${SANDBOX_INTRACTV} == "1" && -t 1 ]] || [[ ${__SANDBOX_TESTING} == "yes"
 			fi
 		fi
 
-		unset sbs_gpdir sbs_cpdir sbs_pdir sbs_bdir sbs_tmpenvfile sbs_PREPWD env
+		unset sbs_pdir sbs_bdir sbs_tmpenvfile sbs_PREPWD env
 	fi
 
 	cd "${PWD}"



             reply	other threads:[~2011-07-04 23:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 23:06 Mike Frysinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-11-17 19:16 [gentoo-commits] proj/sandbox:master commit in: data/ Mike Frysinger
2021-05-04  8:50 Sergei Trofimovich
2021-05-04  8:50 Sergei Trofimovich
2021-05-04  8:50 Sergei Trofimovich
2021-11-05 10:25 Mike Frysinger
2021-11-05 10:25 Mike Frysinger

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=90b5d930ae9163a749b35c3b97f17a010136f976.vapier@gentoo \
    --to=vapier@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