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

Diff of /eclass/subversion.eclass

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

Revision 1.27 Revision 1.31
1# Copyright 1999-2006 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.27 2006/02/05 20:47:17 vapier 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}
184 # for the time being, we use `cp -R` instead of `svn export` due to
185 # a bug in svn export handling. see http://bugs.gentoo.org/119236 182 # "svn export" has a bug. see http://bugs.gentoo.org/119236
186 #svn export "${ESVN_STORE_DIR}/${ESVN_CO_DIR}" "${S}" || die "${ESVN}: can't export to ${S}." 183 #svn export "${ESVN_STORE_DIR}/${ESVN_CO_DIR}" "${S}" || die "${ESVN}: can't export to ${S}."
187 cp -pPR "${ESVN_STORE_DIR}/${ESVN_CO_DIR}" "${S}" || die "${ESVN}: can't copy to ${S}." 184 rsync -a --exclude=".svn/" "${ESVN_STORE_DIR}/${ESVN_CO_DIR}/" "${S}" || die "${ESVN}: can't export to ${S}."
188 find "${S}" -name .svn -print0 | xargs -0 rm -rf {} \;
189 einfo " exported to: ${S}"
190 echo 185 echo
191 186
192} 187}
193 188
194 189
241 236
242## -- subversion_src_unpack() ------------------------------------------------ # 237## -- subversion_src_unpack() ------------------------------------------------ #
243 238
244function subversion_src_unpack() { 239function subversion_src_unpack() {
245 240
246 if [ -n "${A}" ]; then
247 unpack ${A}
248 fi
249
250 subversion_svn_fetch || die "${ESVN}: unknown problem in subversion_svn_fetch()." 241 subversion_svn_fetch || die "${ESVN}: unknown problem in subversion_svn_fetch()."
251 subversion_bootstrap || die "${ESVN}: unknown problem in subversion_bootstrap()." 242 subversion_bootstrap || die "${ESVN}: unknown problem in subversion_bootstrap()."
252 243
253} 244}

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

  ViewVC Help
Powered by ViewVC 1.1.20