Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 96060 Details for
Bug 141806
NEW ECLASS: svncache.eclass
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
update
svncache.eclass (text/plain), 5.67 KB, created by
kalium
on 2006-09-05 06:10:57 UTC
(
hide
)
Description:
update
Filename:
MIME Type:
Creator:
kalium
Created:
2006-09-05 06:10:57 UTC
Size:
5.67 KB
patch
obsolete
># Copyright 1999-2006 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.33 2006/07/22 13:52:38 hattya Exp $ > >## --------------------------------------------------------------------------- # ># Author: Mark Stier ># ># SVN caching and release tag handling. ># ># Usage (inside src_unpack): svncache_fetch https://...@reltag target_dir ># ># Derived from the subversion.eclass file. ># >## --------------------------------------------------------------------------- # > >inherit eutils > >ESVN="svncache.eclass" > >EXPORT_FUNCTIONS src_unpack > >HOMEPAGE="" >DESCRIPTION="" > >DEPEND="dev-util/subversion > net-misc/rsync" > > >## -- ESVN_STORE_DIR: subversion sources store directory ># >ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/svn-cache" > > >## -- ESVN_FETCH_CMD: subversion fetch command ># >ESVN_FETCH_CMD="svn checkout" > >## -- ESVN_UPDATE_CMD: subversion update command ># >ESVN_UPDATE_CMD="svn update" > > >## -- ESVN_OPTIONS: ># ># the options passed to checkout or update. ># >: ESVN_OPTIONS=${ESVN_OPTIONS:=} > > >## -- ESVN_REPO_URI: repository uri ># ># e.g. http://foo/trunk, svn://bar/trunk ># ># supported protocols: ># http:// ># https:// ># svn:// ># svn+ssh:// ># >: ESVN_REPO_URI=${ESVN_REPO_URI:=} > > >## -- ESVN_PROJECT: project name of your ebuild (= name space) ># ># subversion eclass will check out the subversion repository like: ># ># ${ESVN_STORE_DIR}/${ESVN_PROJECT}/${ESVN_REPO_URI##*/} ># ># so if you define ESVN_REPO_URI as http://svn.collab.net/repo/svn/trunk or ># http://svn.collab.net/repo/svn/trunk/. and PN is subversion-svn. ># it will check out like: ># ># ${ESVN_STORE_DIR}/subversion/trunk ># ># this is not used in order to declare the name of the upstream project. ># so that you can declare this like: ># ># # jakarta commons-loggin ># ESVN_PROJECT=commons/logging ># ># default: ${PN/-svn}. ># >: ESVN_PROJECT=${ESVN_PROJECT:=${PN/-svn}} > > >## -- ESVN_BOOTSTRAP: ># ># bootstrap script or command like autogen.sh or etc.. ># >: ESVN_BOOTSTRAP=${ESVN_BOOTSTRAP:=} > > >## -- ESVN_PATCHES: ># ># subversion eclass can apply pathces in subversion_bootstrap(). ># you can use regexp in this valiable like *.diff or *.patch or etc. ># NOTE: this patches will apply before eval ESVN_BOOTSTRAP. ># ># the process of applying the patch is: ># 1. just epatch it, if the patch exists in the path. ># 2. scan it under FILESDIR and epatch it, if the patch exists in FILESDIR. ># 3. die. ># >: ESVN_PATCHES=${ESVN_PATCHES:=} > > >## -- ESVN_RESTRICT: ># ># this should be a space delimited list of subversion eclass features to restrict. ># export) ># dont export the working copy to S. ># >: ESVN_RESTRICT=${ESVN_RESTRICT:=} > > >function svncache_fetch() { > local mypwd=$(pwd) > > # link in subversion certificates to prevent user prompts > [[ ! -L ~/.subversion/auth/svn.ssl.server ]] && { > ebegin "Importing subversion server certs" > rm -rf ~/.subversion/auth/svn.ssl.server || die > install -d ~/.subversion/auth || die > cd ~/.subversion/auth || die > ln -s /usr/share/subversion-certs svn.ssl.server || die > eend 0 > cd "$mypwd" || die > } > > local repo_uri=${1:-${ESVN_REPO_URI}} > > if [[ -z "${repo_uri}" ]]; then > die "${ESVN}: ESVN_REPO_URI is empty." > fi > > # delete trailing slash > if [[ -z "${repo_uri##*/}" ]]; then > repo_uri=${repo_uri%/} > fi > > if [[ ! -d "${ESVN_STORE_DIR}" ]]; then > debug-print "${FUNCNAME}: initial checkout. creating subversion directory" > > addwrite / > mkdir -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}." > export SANDBOX_WRITE=${SANDBOX_WRITE%%:/} > fi > > cd "${ESVN_STORE_DIR}" || die "${ESVN}: can't chdir to ${ESVN_STORE_DIR}" > > # every time > #addwrite "/etc/subversion" > addwrite "${ESVN_STORE_DIR}" > > if ! has userpriv ${FEATURES}; then > # -userpriv > addwrite "/root/.subversion" > > else > # +userpriv > ESVN_OPTIONS="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion" > > fi > > local wc_path="${1%%://*}/${1#*://}" > > # fix path (remove svn release tag) > wc_path=${wc_path%@*} > > # strip last slash > wc_path=${wc_path%/*} > > # determine release tag > local rel=${1##*@} > local srcuri=$1 > local argrel="" > if [ "$rel" == "$1" ]; then > rel="current" > else > srcuri=${srcuri%@*} > argrel="-r $rel" > fi > > # append release tag to path > wc_path="$wc_path""@""$rel" > > debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\"" > > if [[ ! -f "${wc_path}.done" ]]; then > # checkout > einfo "subversion check out start -->" > einfo " repository: ${repo_uri}" > rm -rf "${ESVN_STORE_DIR}/$wc_path" || die > mkdir -p "${ESVN_STORE_DIR}" || die "${ESVN_STORE_DIR}: can't mkdir ${ESVN_STORE_DIR}." > cd "${ESVN_STORE_DIR}" > ${ESVN_FETCH_CMD} ${ESVN_OPTIONS} $argrel "${srcuri}" "$wc_path" || die "${ESVN}: can't fetch from ${repo_uri}." > sync > touch "${wc_path}.done" > elif [ "$rel" == "current" ]; then > # update working copy > einfo "subversion update start -->" > einfo " repository: ${repo_uri}" > cd "${ESVN_STORE_DIR}/${wc_path}" > rm -f "${wc_path##*/}.done" > sync > ${ESVN_UPDATE_CMD} ${ESVN_OPTIONS} || die "${ESVN}: can't update from ${repo_uri}." > sync > touch "${wc_path##*/}.done" > else > einfo "subversion check out not needed, release tag \"$rel\" already fetched -->" > einfo " repository: ${repo_uri}" > fi > > einfo " working copy: ${ESVN_STORE_DIR}/${wc_path}" > > cd "${ESVN_STORE_DIR}/${wc_path}" > > # export to the ${WORKDIR} > #* "svn export" has a bug. see http://bugs.gentoo.org/119236 > #* svn export . "${S}" || die "${ESVN}: can't export to ${S}." > einfo "Copying code from subversion cache..." > [ -d "${mypwd}/$2" ] || mkdir -p "${mypwd}/$2" > [ -d "${mypwd}/$2" ] || die "failed to create dir \"${mypwd}/$2\"" > rsync -rlpgo . "${mypwd}/$2/." || die "${ESVN}: can't export to ${mypwd}/$2." > > echo > cd "$mypwd" || die >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 141806
:
92793
|
92794
|
95277
|
95278
| 96060