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

Diff of /eclass/subversion.eclass

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

Revision 1.26 Revision 1.31
1# Copyright 1999-2005 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/subversion.eclass,v 1.26 2006/01/07 23:46:57 ferringb Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.31 2006/04/30 09:26:56 hattya Exp $
4 4
5## --------------------------------------------------------------------------- # 5## --------------------------------------------------------------------------- #
6# Author: Akinori Hattori <hattya@gentoo.org> 6# Author: Akinori Hattori <hattya@gentoo.org>
7# 7#
8# The subversion eclass is written to fetch the software sources from 8# The subversion eclass is written to fetch the software sources from
157 debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\"" 157 debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
158 158
159 if [ ! -d "${ESVN_CO_DIR}/.svn" ]; then 159 if [ ! -d "${ESVN_CO_DIR}/.svn" ]; then
160 # first check out 160 # first check out
161 einfo "subversion check out start -->" 161 einfo "subversion check out start -->"
162 einfo " checkout from: ${ESVN_REPO_URI}" 162 einfo " repository: ${ESVN_REPO_URI}"
163 163
164 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}." 164 mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
165 chmod -f o+rw "${ESVN_PROJECT}" || die "${ESVN}: can't chmod ${ESVN_PROJECT}." 165 chmod -f o+rw "${ESVN_PROJECT}" || die "${ESVN}: can't chmod ${ESVN_PROJECT}."
166 cd "${ESVN_PROJECT}" 166 cd "${ESVN_PROJECT}"
167 ${ESVN_FETCH_CMD} ${ESVN_OPTIONS} "${ESVN_REPO_URI}" || die "${ESVN}: can't fetch from ${ESVN_REPO_URI}." 167 ${ESVN_FETCH_CMD} ${ESVN_OPTIONS} "${ESVN_REPO_URI}" || die "${ESVN}: can't fetch from ${ESVN_REPO_URI}."
168 168
169 einfo " checkouted in: ${ESVN_STORE_DIR}/${ESVN_CO_DIR}"
170
171 else 169 else
172 # update working copy 170 # update working copy
173 einfo "subversion update start -->" 171 einfo "subversion update start -->"
174 einfo " update from: ${ESVN_REPO_URI}" 172 einfo " repository: ${ESVN_REPO_URI}"
175 173
176 cd "${ESVN_CO_DIR}" 174 cd "${ESVN_CO_DIR}"
177 ${ESVN_UPDATE_CMD} ${ESVN_OPTIONS} || die "${ESVN}: can't update from ${ESVN_REPO_URI}." 175 ${ESVN_UPDATE_CMD} ${ESVN_OPTIONS} || die "${ESVN}: can't update from ${ESVN_REPO_URI}."
178 176
177 fi
178
179 einfo " updated in: ${ESVN_STORE_DIR}/${ESVN_CO_DIR}" 179 einfo " working copy: ${ESVN_STORE_DIR}/${ESVN_CO_DIR}"
180
181 fi
182 180
183 # export to the ${WORKDIR} 181 # export to the ${WORKDIR}
182 # "svn export" has a bug. see http://bugs.gentoo.org/119236
184 svn export "${ESVN_STORE_DIR}/${ESVN_CO_DIR}" "${S}" || die "${ESVN}: can't exportto ${S}." 183 #svn export "${ESVN_STORE_DIR}/${ESVN_CO_DIR}" "${S}" || die "${ESVN}: can't export to ${S}."
185 einfo " exported to: ${S}" 184 rsync -a --exclude=".svn/" "${ESVN_STORE_DIR}/${ESVN_CO_DIR}/" "${S}" || die "${ESVN}: can't export to ${S}."
186 echo 185 echo
187 186
188} 187}
189 188
190 189
237 236
238## -- subversion_src_unpack() ------------------------------------------------ # 237## -- subversion_src_unpack() ------------------------------------------------ #
239 238
240function subversion_src_unpack() { 239function subversion_src_unpack() {
241 240
242 if [ -n "${A}" ]; then
243 unpack ${A}
244 fi
245
246 subversion_svn_fetch || die "${ESVN}: unknown problem in subversion_svn_fetch()." 241 subversion_svn_fetch || die "${ESVN}: unknown problem in subversion_svn_fetch()."
247 subversion_bootstrap || die "${ESVN}: unknown problem in subversion_bootstrap()." 242 subversion_bootstrap || die "${ESVN}: unknown problem in subversion_bootstrap()."
248 243
249} 244}

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20