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

Diff of /eclass/cvs.eclass

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

Revision 1.61 Revision 1.66
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
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.61 2005/09/21 23:22:56 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.66 2006/12/11 00:09:31 vapier Exp $
4#
5# Maintainer: vapier@gentoo.org (and anyone who wants to help)
4 6
5inherit eutils 7inherit eutils
6 8
7# This eclass provides the generic cvs fetching functions. To use 9# This eclass provides the generic cvs fetching functions. To use
8# this from an ebuild, set the `ebuild-configurable settings' as 10# this from an ebuild, set the `ebuild-configurable settings' as
62 64
63 65
64# ECVS_TOP_DIR -- The directory under which CVS modules are checked 66# ECVS_TOP_DIR -- The directory under which CVS modules are checked
65# out. 67# out.
66 68
67[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${DISTDIR}/cvs-src" 69[ -z "$ECVS_TOP_DIR" ] && ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src"
68 70
69# ECVS_SERVER -- CVS path 71# ECVS_SERVER -- CVS path
70# 72#
71# The format is "server:/dir", e.g. "anoncvs.kde.org:/home/kde". 73# The format is "server:/dir", e.g. "anoncvs.kde.org:/home/kde".
72# Remove the other parts of the full CVSROOT, which might look like 74# Remove the other parts of the full CVSROOT, which might look like
111[ -z "$ECVS_AUTH" ] && ECVS_AUTH="pserver" 113[ -z "$ECVS_AUTH" ] && ECVS_AUTH="pserver"
112 114
113# ECVS_USER -- Username to use for authentication on the remote server 115# ECVS_USER -- Username to use for authentication on the remote server
114[ -z "$ECVS_USER" ] && ECVS_USER="anonymous" 116[ -z "$ECVS_USER" ] && ECVS_USER="anonymous"
115 117
116
117# ECVS_PASS -- Password to use for authentication on the remote server 118# ECVS_PASS -- Password to use for authentication on the remote server
118[ -z "$ECVS_PASS" ] && ECVS_PASS="" 119[ -z "$ECVS_PASS" ] && ECVS_PASS=""
119 120
120 121
121# ECVS_SSH_HOST_KEY 122# ECVS_SSH_HOST_KEY
271 # be put in Root 272 # be put in Root
272 if [ "$ECVS_AUTH" == "no" ] 273 if [ "$ECVS_AUTH" == "no" ]
273 then 274 then
274 local server="${ECVS_USER}@${ECVS_SERVER}" 275 local server="${ECVS_USER}@${ECVS_SERVER}"
275 else 276 else
277 local connection="${ECVS_AUTH}"
278 [[ -n ${ECVS_PROXY} ]] && connection="${connection};proxy=${ECVS_PROXY}"
279 [[ -n ${ECVS_PROXY_PORT} ]] && connection="${connection};proxyport=${ECVS_PROXY_PORT}"
276 local server=":${ECVS_AUTH}:${ECVS_USER}@${ECVS_SERVER}" 280 local server=":${connection}:${ECVS_USER}@${ECVS_SERVER}"
277 fi 281 fi
278 282
279 # Switch servers automagically if needed 283 # Switch servers automagically if needed
280 if [ "$mode" == "update" ]; then 284 if [ "$mode" == "update" ]; then
281 cd /$ECVS_TOP_DIR/$ECVS_LOCALNAME 285 cd /$ECVS_TOP_DIR/$ECVS_LOCALNAME
483 [ -z "$ECVS_MODULE" ] && die "ERROR: CVS module not set, cannot continue." 487 [ -z "$ECVS_MODULE" ] && die "ERROR: CVS module not set, cannot continue."
484 488
485 local ECVS_LOCALNAME="${ECVS_LOCALNAME}" 489 local ECVS_LOCALNAME="${ECVS_LOCALNAME}"
486 490
487 if [ -z "$ECVS_LOCALNAME" ]; then 491 if [ -z "$ECVS_LOCALNAME" ]; then
488 ECVS_LOCALNAME="$ECVS_MODULE" 492 ECVS_LOCALNAME="$ECVS_MODULE"
489 fi 493 fi
490 494
491 if [ "$ECVS_SERVER" == "offline" ]; then 495 local offline_pkg_var="ECVS_OFFLINE_${PN}"
496 if [ "${!offline_pkg_var}" == "1" -o "$ECVS_OFFLINE" == "1" -o "$ECVS_SERVER" == "offline" ]; then
492 # We're not required to fetch anything; the module already 497 # We're not required to fetch anything; the module already
493 # exists and shouldn't be updated. 498 # exists and shouldn't be updated.
494 if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then 499 if [ -d "${ECVS_TOP_DIR}/${ECVS_LOCALNAME}" ]; then
495 debug-print "$FUNCNAME: offline mode" 500 debug-print "$FUNCNAME: offline mode"
496 else 501 else
497 debug-print "$FUNCNAME: Offline mode specified but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found, exiting with error" 502 debug-print "$FUNCNAME: Offline mode specified but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found, exiting with error"
498 die "ERROR: Offline mode specified, but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found. Aborting." 503 die "ERROR: Offline mode specified, but directory ${ECVS_TOP_DIR}/${ECVS_LOCALNAME} not found. Aborting."
499 fi 504 fi

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.66

  ViewVC Help
Powered by ViewVC 1.1.20