/[gentoo-x86]/eclass/cvs.eclass
Gentoo

Diff of /eclass/cvs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.8 Revision 1.9
1# Copyright 1999-2000 Gentoo Technologies, Inc. 1# Copyright 1999-2000 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License, v2 or later 2# Distributed under the terms of the GNU General Public License, v2 or later
3# Author Dan Armak <danarmak@gentoo.org> 3# Author Dan Armak <danarmak@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.8 2002/08/02 09:44:35 danarmak Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.9 2002/08/03 10:46:01 danarmak Exp $
5# This eclass provides the generic cvs fetching functions. 5# This eclass provides the generic cvs fetching functions.
6 6
7ECLASS=cvs 7ECLASS=cvs
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
9 9
26#[ -n "$ECVS_LOCAL" ] && ECVS_CVS_OPTIONS="$ECVS_CVS_OPTIONS -l" 26#[ -n "$ECVS_LOCAL" ] && ECVS_CVS_OPTIONS="$ECVS_CVS_OPTIONS -l"
27 27
28# Where the cvs modules are stored/accessed 28# Where the cvs modules are stored/accessed
29[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="/usr/src" 29[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="/usr/src"
30 30
31# Name of cvs server, set to "" to disable fetching 31# Name of cvs server, set to "offline" to disable fetching
32# (i.e. to assume module is checked out already and don't update it). 32# (i.e. to assume module is checked out already and don't update it).
33# Format is server:/dir e.g. "anoncvs.kde.org:/home/kde". remove the other 33# Format is server:/dir e.g. "anoncvs.kde.org:/home/kde". remove the other
34# parts of the full CVSROOT (which looks like 34# parts of the full CVSROOT (which looks like
35# ":pserver:anonymous@anoncvs.kde.org:/home/kde"); these are added from 35# ":pserver:anonymous@anoncvs.kde.org:/home/kde"); these are added from
36# other settings 36# other settings
37[ -z "$ECVS_SERVER" ] && ECVS_SERVER="" 37[ -z "$ECVS_SERVER" ] && ECVS_SERVER="offline"
38 38
39# Username to use 39# Username to use
40[ -z "$ECVS_USER" ] && ECVS_USER="anonymous" 40[ -z "$ECVS_USER" ] && ECVS_USER="anonymous"
41 41
42# Password to use (NOT (YET) SUPPORTED, because cvs doesn't store passwords in plaintext in .cvspass) 42# Password to use (NOT (YET) SUPPORTED, because cvs doesn't store passwords in plaintext in .cvspass)
80 80
81 [ -n "$ECVS_LOCAL" ] && ECVS_CVS_OPTIONS="$ECVS_CVS_OPTIONS -l" 81 [ -n "$ECVS_LOCAL" ] && ECVS_CVS_OPTIONS="$ECVS_CVS_OPTIONS -l"
82 82
83 addread $DIR 83 addread $DIR
84 84
85 if [ -z "$ECVS_SERVER" ]; then 85 if [ "$ECVS_SERVER" == "offline" ]; then
86 # we're not required to fetch anything, the module already exists and shouldn't be updated 86 # we're not required to fetch anything, the module already exists and shouldn't be updated
87 if [ -d "$DIR" ]; then 87 if [ -d "$DIR" ]; then
88 debug-print "$FUNCNAME: offline mode, exiting" 88 debug-print "$FUNCNAME: offline mode, exiting"
89 return 0 89 return 0
90 else 90 else
100 addwrite $ECVS_TOP_DIR/$ECVS_MODULE 100 addwrite $ECVS_TOP_DIR/$ECVS_MODULE
101 101
102 if [ ! -d "$DIR" ]; then 102 if [ ! -d "$DIR" ]; then
103 debug-print "$FUNCNAME: creating cvs directory $DIR" 103 debug-print "$FUNCNAME: creating cvs directory $DIR"
104 einfo "Creating directory $DIR" 104 einfo "Creating directory $DIR"
105 export SANDBOX_WRITE="$SANDBOX_WRITE:/foo:/"
105 mkdir -p /$DIR 106 mkdir -p /$DIR
107 export SANDBOX_WRITE=${SANDBOX_WRITE//:\/foo:\/}
106 fi 108 fi
107 109
108 # prepare a cvspass file just for this session so that cvs thinks we're logged 110 # prepare a cvspass file just for this session so that cvs thinks we're logged
109 # in at the cvs server. we don't want to mess with ~/.cvspass. 111 # in at the cvs server. we don't want to mess with ~/.cvspass.
110 echo ":pserver:${ECVS_SERVER} A" > ${T}/cvspass 112 echo ":pserver:${ECVS_SERVER} A" > ${T}/cvspass

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20