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

Diff of /eclass/cvs.eclass

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

Revision 1.37 Revision 1.38
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.37 2003/04/22 09:17:17 danarmak Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.38 2003/04/22 20:43:29 danarmak Exp $
4# 4#
5# Author Dan Armak <danarmak@gentoo.org> 5# Author Dan Armak <danarmak@gentoo.org>
6# 6#
7# This eclass provides the generic cvs fetching functions. 7# This eclass provides the generic cvs fetching functions.
8# to use from an ebuild, set the 'ebuild-configurable settings' below in your ebuild before inheriting. 8# to use from an ebuild, set the 'ebuild-configurable settings' below in your ebuild before inheriting.
161 done 161 done
162 162
163 fi 163 fi
164 fi 164 fi
165 165
166 # the server string with the password in it
167 # needed for mode=update too as we may not be inside ECVS_MODULE but only inside ECVS_TOP_DIR
168 # however putting the password in in update mode can break (?)
169 if [ "$mode" == "checkout" ]; then
170 export CVSROOT=":${ECVS_AUTH}:${ECVS_USER}:${ECVS_PASS}@${ECVS_SERVER}"
171 else
172 export CVSROOT=":${ECVS_AUTH}:${ECVS_USER}@${ECVS_SERVER}"
173 fi
174
175 # prepare a cvspass file just for this session, we don't want to mess with ~/.cvspass 166 # prepare a cvspass file just for this session, we don't want to mess with ~/.cvspass
176 touch "${T}/cvspass" 167 touch "${T}/cvspass"
177 export CVS_PASSFILE="${T}/cvspass" 168 export CVS_PASSFILE="${T}/cvspass"
178 if [ -n "$ECVS_RUNAS" ]; then 169 if [ -n "$ECVS_RUNAS" ]; then
179 chown "$ECVS_RUNAS" "${T}/cvspass" 170 chown "$ECVS_RUNAS" "${T}/cvspass"
180 fi 171 fi
181 172
173 # the server string with the password in it, for login
174 cvsroot_pass=":${ECVS_AUTH}:${ECVS_USER}:${ECVS_PASS}@${ECVS_SERVER}"
175 # ditto without the password, for checkout/update after login, so that
176 # the CVS/Root files don't contain the password in plaintext
177 cvsroot_nopass=":${ECVS_AUTH}:${ECVS_USER}@${ECVS_SERVER}"
178
182 # commands to run 179 # commands to run
180 cmdlogin="${run} ${ECVS_CVS_COMMAND} -d \"${cvsroot_pass}\" login"
183 cmdupdate="${run} ${ECVS_CVS_COMMAND} update ${ECVS_UP_OPTS} ${ECVS_MODULE}" 181 cmdupdate="${run} ${ECVS_CVS_COMMAND} -d \"${cvsroot_nopass}\" update ${ECVS_UP_OPTS} ${ECVS_MODULE}"
184 cmdcheckout="${run} ${ECVS_CVS_COMMAND} checkout ${ECVS_CO_OPTS} ${ECVS_MODULE}" 182 cmdcheckout="${run} ${ECVS_CVS_COMMAND} -d \"${cvsroot_nopass}\" checkout ${ECVS_CO_OPTS} ${ECVS_MODULE}"
185 183
186 cd "${ECVS_TOP_DIR}" 184 cd "${ECVS_TOP_DIR}"
187 if [ "${ECVS_AUTH}" == "pserver" ]; then 185 if [ "${ECVS_AUTH}" == "pserver" ]; then
186 einfo "Running $cmdlogin"
187 eval $cmdlogin
188 if [ "${mode}" == "update" ]; then 188 if [ "${mode}" == "update" ]; then
189 einfo "Running $cmdupdate"
189 $cmdupdate 190 eval $cmdupdate
190 elif [ "${mode}" == "checkout" ]; then 191 elif [ "${mode}" == "checkout" ]; then
192 einfo "Running $cmdcheckout"
191 $cmdcheckout 193 eval $cmdcheckout
192 fi 194 fi
193# elif [ "${ECVS_AUTH}" == "ext" ]; then 195# elif [ "${ECVS_AUTH}" == "ext" ]; then
194# # for ext there's also a possible ssh prompt, code not yet written 196# # for ext there's also a possible ssh prompt, code not yet written
195# echo "${ECVS_DELAY} continue connecting&yes" >> "$instruct" 197# echo "${ECVS_DELAY} continue connecting&yes" >> "$instruct"
196# echo "${ECVS_DELAY} CVS password:&${ECVS_PASS}" >> "$instruct" 198# echo "${ECVS_DELAY} CVS password:&${ECVS_PASS}" >> "$instruct"

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20