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

Diff of /eclass/subversion.eclass

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

Revision 1.59 Revision 1.62
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2009 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/subversion.eclass,v 1.59 2008/05/15 13:27:40 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.62 2009/04/26 01:57:14 arfrever Exp $
4 4
5# @ECLASS: subversion.eclass 5# @ECLASS: subversion.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Akinori Hattori <hattya@gentoo.org> 7# Akinori Hattori <hattya@gentoo.org>
8# Bo ├śrsted Andresen <zlin@gentoo.org> 8# Bo ├śrsted Andresen <zlin@gentoo.org>
9# Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
9# 10#
10# Original Author: Akinori Hattori <hattya@gentoo.org> 11# Original Author: Akinori Hattori <hattya@gentoo.org>
11# 12#
12# @BLURB: The subversion eclass is written to fetch software sources from subversion repositories 13# @BLURB: The subversion eclass is written to fetch software sources from subversion repositories
13# @DESCRIPTION: 14# @DESCRIPTION:
204 if [[ "${ESVN_OPTIONS}" = *-r* ]]; then 205 if [[ "${ESVN_OPTIONS}" = *-r* ]]; then
205 ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please" 206 ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please"
206 ewarn "see \${ESVN_REPO_URI}" 207 ewarn "see \${ESVN_REPO_URI}"
207 fi 208 fi
208 209
210 if has_version ">=dev-util/subversion-1.6.0"; then
211 options="${options} --config-option=config:auth:password-stores="
212 fi
213
209 debug-print "${FUNCNAME}: wc_path = \"${wc_path}\"" 214 debug-print "${FUNCNAME}: wc_path = \"${wc_path}\""
210 debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\"" 215 debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
211 debug-print "${FUNCNAME}: options = \"${options}\"" 216 debug-print "${FUNCNAME}: options = \"${options}\""
212 217
213 if [[ ! -d ${wc_path}/.svn ]]; then 218 if [[ ! -d ${wc_path}/.svn ]]; then
223 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}." 228 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
224 cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}" 229 cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
225 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}." 230 ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
226 231
227 elif [[ -n ${ESVN_OFFLINE} ]]; then 232 elif [[ -n ${ESVN_OFFLINE} ]]; then
233 svn cleanup "${wc_path}"
228 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy." 234 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
229 if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then 235 if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
230 die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally." 236 die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
231 fi 237 fi
232 einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}." 238 einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}."
233 else 239 else
240 svn cleanup "${wc_path}"
234 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy." 241 subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
235 242
236 local esvn_up_freq= 243 local esvn_up_freq=
237 if [[ -n ${ESVN_UP_FREQ} ]]; then 244 if [[ -n ${ESVN_UP_FREQ} ]]; then
238 if [[ -n ${ESVN_UP_FREQ//[[:digit:]]} ]]; then 245 if [[ -n ${ESVN_UP_FREQ//[[:digit:]]} ]]; then
271 278
272 if ! has "export" ${ESVN_RESTRICT}; then 279 if ! has "export" ${ESVN_RESTRICT}; then
273 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}" 280 cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
274 281
275 local S="${S}/${S_dest}" 282 local S="${S}/${S_dest}"
283 mkdir -p "${S}"
276 284
277 # export to the ${WORKDIR} 285 # export to the ${WORKDIR}
278 #* "svn export" has a bug. see http://bugs.gentoo.org/119236 286 #* "svn export" has a bug. see http://bugs.gentoo.org/119236
279 #* svn export . "${S}" || die "${ESVN}: can't export to ${S}." 287 #* svn export . "${S}" || die "${ESVN}: can't export to ${S}."
280 rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}." 288 rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}."

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.62

  ViewVC Help
Powered by ViewVC 1.1.20