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

Diff of /eclass/subversion.eclass

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

Revision 1.77 Revision 1.78
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.77 2012/06/10 10:08:36 hattya Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.78 2012/06/10 11:05:46 hattya 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# @AUTHOR: 8# @AUTHOR:
229 if [[ ! -d ${ESVN_STORE_DIR} ]]; then 229 if [[ ! -d ${ESVN_STORE_DIR} ]]; then
230 debug-print "${FUNCNAME}: initial checkout. creating subversion directory" 230 debug-print "${FUNCNAME}: initial checkout. creating subversion directory"
231 mkdir -m 775 -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}." 231 mkdir -m 775 -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}."
232 fi 232 fi
233 233
234 pushd "${ESVN_STORE_DIR}" > /dev/null || die "${ESVN}: can't chdir to ${ESVN_STORE_DIR}" 234 pushd "${ESVN_STORE_DIR}" >/dev/null || die "${ESVN}: can't chdir to ${ESVN_STORE_DIR}"
235 235
236 local wc_path="$(subversion__get_wc_path "${repo_uri}")" 236 local wc_path="$(subversion__get_wc_path "${repo_uri}")"
237 local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion" 237 local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
238 238
239 [[ -n "${revision}" ]] && options="${options} -r ${revision}" 239 [[ -n "${revision}" ]] && options="${options} -r ${revision}"
359 #* "svn export" has a bug. see http://bugs.gentoo.org/119236 359 #* "svn export" has a bug. see http://bugs.gentoo.org/119236
360 #* svn export . "${S}" || die "${ESVN}: can't export to ${S}." 360 #* svn export . "${S}" || die "${ESVN}: can't export to ${S}."
361 rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}." 361 rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}."
362 fi 362 fi
363 363
364 popd > /dev/null 364 popd >/dev/null
365 echo 365 echo
366} 366}
367 367
368# @FUNCTION: subversion_bootstrap 368# @FUNCTION: subversion_bootstrap
369# @DESCRIPTION: 369# @DESCRIPTION:
520# Log the svn revision of source code. Doing this in pkg_preinst because we 520# Log the svn revision of source code. Doing this in pkg_preinst because we
521# want the logs to stick around if packages are uninstalled without messing with 521# want the logs to stick around if packages are uninstalled without messing with
522# config protection. 522# config protection.
523subversion_pkg_preinst() { 523subversion_pkg_preinst() {
524 local pkgdate=$(date "+%Y%m%d %H:%M:%S") 524 local pkgdate=$(date "+%Y%m%d %H:%M:%S")
525 subversion_wc_info "${1:-${ESVN_REPO_URI}}" 525 subversion_wc_info "${1}"
526 if [[ -n ${ESCM_LOGDIR} ]]; then 526 if [[ -n ${ESCM_LOGDIR} ]]; then
527 local dir="${ROOT}/${ESCM_LOGDIR}/${CATEGORY}" 527 local dir="${ROOT}/${ESCM_LOGDIR}/${CATEGORY}"
528 if [[ ! -d ${dir} ]]; then 528 if [[ ! -d ${dir} ]]; then
529 mkdir -p "${dir}" || \ 529 mkdir -p "${dir}" || eerror "Failed to create '${dir}' for logging svn revision"
530 eerror "Failed to create '${dir}' for logging svn revision to '${PORTDIR_SCM}'"
531 fi 530 fi
532 local logmessage="svn: ${pkgdate} - ${PF}:${SLOT} was merged at revision ${ESVN_WC_REVISION}" 531 local logmessage="svn: ${pkgdate} - ${PF}:${SLOT} was merged at revision ${ESVN_WC_REVISION}"
533 if [[ -d ${dir} ]]; then 532 if [[ -d ${dir} ]]; then
534 echo "${logmessage}" >> "${dir}/${PN}.log" 533 echo "${logmessage}" >>"${dir}/${PN}.log"
535 else 534 else
536 eerror "Could not log the message '${logmessage}' to '${dir}/${PN}.log'" 535 eerror "Could not log the message '${logmessage}' to '${dir}/${PN}.log'"
537 fi 536 fi
538 fi 537 fi
539} 538}

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78

  ViewVC Help
Powered by ViewVC 1.1.20