summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Armak <danarmak@gentoo.org>2002-08-03 10:46:01 +0000
committerDan Armak <danarmak@gentoo.org>2002-08-03 10:46:01 +0000
commitda978f9e79893d38a8a2c6e2641b295ae8862550 (patch)
tree26eec8afc8fb1e6f85124cb3b871dc125d8f9939 /eclass/cvs.eclass
parentmask latest revision of gettext (diff)
downloadgentoo-2-da978f9e79893d38a8a2c6e2641b295ae8862550.tar.gz
gentoo-2-da978f9e79893d38a8a2c6e2641b295ae8862550.tar.bz2
gentoo-2-da978f9e79893d38a8a2c6e2641b295ae8862550.zip
fix sandbox issues with creation of the top directory; make the setting for offline mode ECVS_SERVER=offline to avoid messing with troublesome empty variable/unset variable distintions
Diffstat (limited to 'eclass/cvs.eclass')
-rw-r--r--eclass/cvs.eclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass
index f1d6fa0d24c7..82783bf76790 100644
--- a/eclass/cvs.eclass
+++ b/eclass/cvs.eclass
@@ -1,7 +1,7 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Dan Armak <danarmak@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.8 2002/08/02 09:44:35 danarmak Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.9 2002/08/03 10:46:01 danarmak Exp $
# This eclass provides the generic cvs fetching functions.
ECLASS=cvs
@@ -28,13 +28,13 @@ INHERITED="$INHERITED $ECLASS"
# Where the cvs modules are stored/accessed
[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="/usr/src"
-# Name of cvs server, set to "" to disable fetching
+# Name of cvs server, set to "offline" to disable fetching
# (i.e. to assume module is checked out already and don't update it).
# Format is server:/dir e.g. "anoncvs.kde.org:/home/kde". remove the other
# parts of the full CVSROOT (which looks like
# ":pserver:anonymous@anoncvs.kde.org:/home/kde"); these are added from
# other settings
-[ -z "$ECVS_SERVER" ] && ECVS_SERVER=""
+[ -z "$ECVS_SERVER" ] && ECVS_SERVER="offline"
# Username to use
[ -z "$ECVS_USER" ] && ECVS_USER="anonymous"
@@ -82,7 +82,7 @@ DIR=$DIR"
addread $DIR
- if [ -z "$ECVS_SERVER" ]; then
+ if [ "$ECVS_SERVER" == "offline" ]; then
# we're not required to fetch anything, the module already exists and shouldn't be updated
if [ -d "$DIR" ]; then
debug-print "$FUNCNAME: offline mode, exiting"
@@ -102,7 +102,9 @@ DIR=$DIR"
if [ ! -d "$DIR" ]; then
debug-print "$FUNCNAME: creating cvs directory $DIR"
einfo "Creating directory $DIR"
+ export SANDBOX_WRITE="$SANDBOX_WRITE:/foo:/"
mkdir -p /$DIR
+ export SANDBOX_WRITE=${SANDBOX_WRITE//:\/foo:\/}
fi
# prepare a cvspass file just for this session so that cvs thinks we're logged