* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-17 7:59 Akinori Hattori (hattya)
0 siblings, 0 replies; 27+ messages in thread
From: Akinori Hattori (hattya) @ 2008-02-17 7:59 UTC (permalink / raw
To: gentoo-commits
hattya 08/02/17 07:59:06
Modified: subversion.eclass
Log:
fixes bug #188255 and bug #205787.
Revision Changes Path
1.45 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.45&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.45&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.44&r2=1.45
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- subversion.eclass 3 Jul 2007 08:27:40 -0000 1.44
+++ subversion.eclass 17 Feb 2008 07:59:06 -0000 1.45
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.44 2007/07/03 08:27:40 peper Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.45 2008/02/17 07:59:06 hattya Exp $
## --------------------------------------------------------------------------- #
# Author: Akinori Hattori <hattya@gentoo.org>
@@ -31,7 +31,7 @@
## -- ESVN_STORE_DIR: subversion sources store directory
#
-ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/svn-src"
+[ -z "${ESVN_STORE_DIR}" ] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src"
## -- ESVN_FETCH_CMD: subversion fetch command
@@ -47,7 +47,7 @@
#
# the options passed to checkout or update.
#
-: ${ESVN_OPTIONS=}
+: ${ESVN_OPTIONS:=}
## -- ESVN_REPO_URI: repository uri
@@ -60,7 +60,7 @@
# svn://
# svn+ssh://
#
-: ${ESVN_REPO_URI=}
+: ${ESVN_REPO_URI:=}
## -- ESVN_PROJECT: project name of your ebuild (= name space)
@@ -90,7 +90,7 @@
#
# bootstrap script or command like autogen.sh or etc..
#
-: ${ESVN_BOOTSTRAP=}
+: ${ESVN_BOOTSTRAP:=}
## -- ESVN_PATCHES:
@@ -99,10 +99,12 @@
# you can use regexp in this variable like *.diff or *.patch or etc.
# NOTE: patches will be applied before ESVN_BOOTSTRAP is processed.
#
-# Patches are searched both in / and ${FILESDIR}, if not found in both locations,
-# the installation dies.
+# 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:
@@ -112,7 +114,7 @@
# export)
# don't export the working copy to S.
#
-: ${ESVN_RESTRICT=}
+: ${ESVN_RESTRICT:=}
## -- subversion_fetch() ----------------------------------------------------- #
@@ -121,6 +123,7 @@
# @param $2 - a check out path in S.
#
function subversion_fetch() {
+
local repo_uri="$(subversion__get_repository_uri "${1}")"
local S_dest="${2}"
@@ -144,6 +147,7 @@
;;
esac
+ # every time
addread "/etc/subversion"
addwrite "${ESVN_STORE_DIR}"
@@ -172,9 +176,9 @@
cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch from ${repo_uri}."
- subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
else
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
+
if [ "${ESVN_WC_URL}" != "$(subversion__get_repository_uri "${repo_uri}" 1)" ]; then
die "${ESVN}: ESVN_REPO_URI (or specified URI) and working copy's URL are not matched."
fi
@@ -187,6 +191,7 @@
cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update from ${repo_uri}."
+
fi
einfo " working copy: ${wc_path}"
@@ -203,12 +208,14 @@
fi
echo
+
}
## -- subversion_bootstrap() ------------------------------------------------ #
#
function subversion_bootstrap() {
+
if has "export" ${ESVN_RESTRICT}; then
return
fi
@@ -219,19 +226,25 @@
einfo "apply patches -->"
local patch fpatch
+
for patch in ${ESVN_PATCHES}; do
if [[ -f "${patch}" ]]; then
epatch "${patch}"
+
else
for fpatch in ${FILESDIR}/${patch}; do
if [[ -f "${fpatch}" ]]; then
epatch "${fpatch}"
+
else
die "${ESVN}: ${patch} not found"
+
fi
done
+
fi
done
+
echo
fi
@@ -241,42 +254,62 @@
if [[ -f "${ESVN_BOOTSTRAP}" && -x "${ESVN_BOOTSTRAP}" ]]; then
einfo " bootstrap with a file: ${ESVN_BOOTSTRAP}"
eval "./${ESVN_BOOTSTRAP}" || die "${ESVN}: can't execute ESVN_BOOTSTRAP."
+
else
einfo " bootstrap with command: ${ESVN_BOOTSTRAP}"
eval "${ESVN_BOOTSTRAP}" || die "${ESVN}: can't eval ESVN_BOOTSTRAP."
+
fi
fi
+
}
+
## -- subversion_src_unpack() ------------------------------------------------ #
#
function subversion_src_unpack() {
+
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
+
}
## -- subversion_wc_info() --------------------------------------------------- #
#
+# the working copy information on the specified repository URI are set to
+# ESVN_WC_* variables.
+#
+# the available variables:
+# ESVN_WC_URL
+# ESVN_WC_REVISION
+# ESVN_WC_PATH
+#
# @param $1 - repository URI. default is ESVN_REPO_URI.
#
function subversion_wc_info() {
+
local repo_uri="$(subversion__get_repository_uri "${1}")"
local wc_path="$(subversion__get_wc_path "${repo_uri}")"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
debug-print "${FUNCNAME}: wc_path = ${wc_path}"
- if [[ ! -e "${wc_path}" ]]; then
+ if [[ ! -d "${wc_path}" ]]; then
return 1
fi
local k
+
for k in url revision; do
export ESVN_WC_$(subversion__to_upper_case "${k}")="$(subversion__svn_info "${wc_path}" "${k}")"
done
+
+ export ESVN_WC_PATH="${wc_path}"
+
}
+
## -- Private Functions
@@ -286,10 +319,12 @@
# @param $2 - a key name.
#
function subversion__svn_info() {
+
local target="${1}"
local key="${2}"
env LC_ALL=C svn info "${target}" | grep -i "^${key}" | cut -d" " -f2-
+
}
@@ -300,6 +335,7 @@
# specified.
#
function subversion__get_repository_uri() {
+
local repo_uri="${1:-${ESVN_REPO_URI}}"
local remove_peg_revision="${2}"
@@ -325,6 +361,7 @@
fi
echo "${repo_uri}"
+
}
@@ -333,11 +370,13 @@
# @param $1 - a repository URI.
#
function subversion__get_wc_path() {
+
local repo_uri="$(subversion__get_repository_uri "${1}" 1)"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
echo "${ESVN_STORE_DIR}/${ESVN_PROJECT}/${repo_uri##*/}"
+
}
@@ -346,6 +385,7 @@
# @param $1 - a repository URI.
#
function subversion__has_peg_revision() {
+
local repo_uri="${1}"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
@@ -376,6 +416,7 @@
debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
return 0
+
}
@@ -384,5 +425,7 @@
# @param $@ - the strings to upper case.
#
function subversion__to_upper_case() {
- echo "${@}" | tr "[a-z]" "[A-Z]"
+
+ echo "${@}" | tr "[:lower:]" "[:upper:]"
+
}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-20 17:11 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-20 17:11 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/20 17:11:34
Modified: subversion.eclass
Log:
Document subversion.eclass for use with eclass-manpages. Add myself to maintainers.
Revision Changes Path
1.46 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.46&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.46&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.45&r2=1.46
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- subversion.eclass 17 Feb 2008 07:59:06 -0000 1.45
+++ subversion.eclass 20 Feb 2008 17:11:34 -0000 1.46
@@ -1,58 +1,58 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.45 2008/02/17 07:59:06 hattya Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.46 2008/02/20 17:11:34 zlin Exp $
-## --------------------------------------------------------------------------- #
-# Author: Akinori Hattori <hattya@gentoo.org>
+# @ECLASS: subversion.eclass
+# @MAINTAINER:
+# Akinori Hattori <hattya@gentoo.org>
+# Bo Ørsted Andresen <zlin@gentoo.org>
#
-# The subversion eclass is written to fetch the software sources from
-# subversion repositories like the cvs eclass.
+# Original Author: Akinori Hattori <hattya@gentoo.org>
#
+# @BLURB: The subversion eclass is written to fetch software sources from subversion repositories
+# @DESCRIPTION:
+# The subversion eclass provides functions to fetch, patch and bootstrap
+# software sources from subversion repositories.
#
-# Description:
-# If you use this eclass, the ${S} is ${WORKDIR}/${P}.
-# It is necessary to define the ESVN_REPO_URI variable at least.
-#
-## --------------------------------------------------------------------------- #
+# You must define the ESVN_REPO_URI variable before inheriting this eclass.
inherit eutils
-ESVN="subversion.eclass"
+ESVN="${ECLASS}"
EXPORT_FUNCTIONS src_unpack
DESCRIPTION="Based on the ${ECLASS} eclass"
+DEPEND="dev-util/subversion
+ net-misc/rsync"
-## -- add subversion in DEPEND
-#
-DEPEND="dev-util/subversion"
-
-
-## -- ESVN_STORE_DIR: subversion sources store directory
-#
-[ -z "${ESVN_STORE_DIR}" ] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src"
-
-
-## -- ESVN_FETCH_CMD: subversion fetch command
-#
+# @ECLASS-VARIABLE: ESVN_STORE_DIR
+# @DESCRIPTION:
+# subversion sources store directory. Users may override this in /etc/make.conf
+[[ -z ${ESVN_STORE_DIR} ]] && ESVN_STORE_DIR="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/svn-src"
+
+# @ECLASS-VARIABLE: ESVN_FETCH_CMD
+# @DESCRIPTION:
+# subversion checkout command
ESVN_FETCH_CMD="svn checkout"
-## -- ESVN_UPDATE_CMD: subversion update command
-#
+# @ECLASS-VARIABLE: ESVN_UPDATE_CMD
+# @DESCRIPTION:
+# subversion update command
ESVN_UPDATE_CMD="svn update"
-
-## -- ESVN_OPTIONS:
-#
-# the options passed to checkout or update.
-#
-: ${ESVN_OPTIONS:=}
-
-
-## -- ESVN_REPO_URI: repository uri
+# @ECLASS-VARIABLE: ESVN_OPTIONS
+# @DESCRIPTION:
+# the options passed to checkout or update. If you want a specific revision see
+# ESVN_REPO_URI instead of using -rREV.
+ESVN_OPTIONS="${ESVN_OPTIONS:-}"
+
+# @ECLASS-VARIABLE: ESVN_REPO_URI
+# @DESCRIPTION:
+# repository uri
#
-# e.g. http://foo/trunk, svn://bar/trunk
+# e.g. http://foo/trunk, svn://bar/trunk, svn://bar/branch/foo@1234
#
# supported protocols:
# http://
@@ -60,10 +60,12 @@
# svn://
# svn+ssh://
#
-: ${ESVN_REPO_URI:=}
+# to peg to a specific revision, append @REV to the repo's uri
+ESVN_REPO_URI="${ESVN_REPO_URI:-}"
-
-## -- ESVN_PROJECT: project name of your ebuild (= name space)
+# @ECLASS-VARIABLE: ESVN_PROJECT
+# @DESCRIPTION:
+# project name of your ebuild (= name space)
#
# subversion eclass will check out the subversion repository like:
#
@@ -82,48 +84,41 @@
# ESVN_PROJECT=commons/logging
#
# default: ${PN/-svn}.
-#
-: ${ESVN_PROJECT:=${PN/-svn}}
+ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
-
-## -- ESVN_BOOTSTRAP:
-#
+# @ECLASS-VARIABLE: ESVN_BOOTSTRAP
+# @DESCRIPTION:
# bootstrap script or command like autogen.sh or etc..
-#
-: ${ESVN_BOOTSTRAP:=}
-
+ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
-## -- ESVN_PATCHES:
-#
-# subversion eclass can apply pathces in subversion_bootstrap().
+# @ECLASS-VARIABLE: ESVN_PATCHES
+# @DESCRIPTION:
+# subversion eclass can apply patches in subversion_bootstrap().
# you can use regexp in this variable like *.diff or *.patch or etc.
# NOTE: patches will be applied before ESVN_BOOTSTRAP is processed.
#
-# 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:=}
+# Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
+# location, the installation dies.
+ESVN_PATCHES="${ESVN_PATCHES:-}"
-
-## -- ESVN_RESTRICT:
-#
+# @ECLASS-VARIABLE: ESVN_RESTRICT
+# @DESCRIPTION:
# this should be a space delimited list of subversion eclass features to
# restrict.
# export)
# don't export the working copy to S.
-#
-: ${ESVN_RESTRICT:=}
-
-
-## -- subversion_fetch() ----------------------------------------------------- #
-#
-# @param $1 - a repository URI. default is the ESVN_REPO_URI.
-# @param $2 - a check out path in S.
-#
-function subversion_fetch() {
+ESVN_RESTRICT="${ESVN_RESTRICT:-}"
+# @FUNCTION: subversion_fetch
+# @USAGE: [repo_uri] [destination]
+# @DESCRIPTION:
+# Wrapper function to fetch sources from subversion via svn checkout or svn update,
+# depending on whether there is an existing working copy in ${ESVN_STORE_DIR}.
+#
+# Can take two optional parameters:
+# repo_uri - a repository URI. default is ESVN_REPO_URI.
+# destination - a check out path in S.
+subversion_fetch() {
local repo_uri="$(subversion__get_repository_uri "${1}")"
local S_dest="${2}"
@@ -143,15 +138,14 @@
svn|svn+ssh)
;;
*)
- die "${ESVN}: fetch from "${protocol}" is not yet implemented."
+ die "${ESVN}: fetch from '${protocol}' is not yet implemented."
;;
esac
- # every time
addread "/etc/subversion"
addwrite "${ESVN_STORE_DIR}"
- if [[ ! -d "${ESVN_STORE_DIR}" ]]; then
+ if [[ ! -d ${ESVN_STORE_DIR} ]]; then
debug-print "${FUNCNAME}: initial checkout. creating subversion directory"
mkdir -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}."
fi
@@ -165,7 +159,7 @@
debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
debug-print "${FUNCNAME}: options = \"${options}\""
- if [[ ! -d "${wc_path}/.svn" ]]; then
+ if [[ ! -d ${wc_path}/.svn ]]; then
# first check out
einfo "subversion check out start -->"
einfo " repository: ${repo_uri}"
@@ -179,7 +173,7 @@
else
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
- if [ "${ESVN_WC_URL}" != "$(subversion__get_repository_uri "${repo_uri}" 1)" ]; then
+ if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}" 1) ]]; then
die "${ESVN}: ESVN_REPO_URI (or specified URI) and working copy's URL are not matched."
fi
@@ -208,32 +202,30 @@
fi
echo
-
}
-
-## -- subversion_bootstrap() ------------------------------------------------ #
-#
-function subversion_bootstrap() {
-
+# @FUNCTION: subversion_bootstrap
+# @DESCRIPTION:
+# Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
+subversion_bootstrap() {
if has "export" ${ESVN_RESTRICT}; then
return
fi
cd "${S}"
- if [[ -n "${ESVN_PATCHES}" ]]; then
+ if [[ -n ${ESVN_PATCHES} ]]; then
einfo "apply patches -->"
local patch fpatch
for patch in ${ESVN_PATCHES}; do
- if [[ -f "${patch}" ]]; then
+ if [[ -f ${patch} ]]; then
epatch "${patch}"
else
for fpatch in ${FILESDIR}/${patch}; do
- if [[ -f "${fpatch}" ]]; then
+ if [[ -f ${fpatch} ]]; then
epatch "${fpatch}"
else
@@ -248,10 +240,10 @@
echo
fi
- if [[ -n "${ESVN_BOOTSTRAP}" ]]; then
+ if [[ -n ${ESVN_BOOTSTRAP} ]]; then
einfo "begin bootstrap -->"
- if [[ -f "${ESVN_BOOTSTRAP}" && -x "${ESVN_BOOTSTRAP}" ]]; then
+ if [[ -f ${ESVN_BOOTSTRAP} && -x ${ESVN_BOOTSTRAP} ]]; then
einfo " bootstrap with a file: ${ESVN_BOOTSTRAP}"
eval "./${ESVN_BOOTSTRAP}" || die "${ESVN}: can't execute ESVN_BOOTSTRAP."
@@ -261,41 +253,32 @@
fi
fi
-
}
-
-## -- subversion_src_unpack() ------------------------------------------------ #
-#
-function subversion_src_unpack() {
-
+# @FUNCTION: subversion_src_unpack
+# @DESCRIPTION:
+# default src_unpack. fetch and bootstrap.
+subversion_src_unpack() {
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
-
}
-
-## -- subversion_wc_info() --------------------------------------------------- #
+# @FUNCTION: subversion_wc_info
+# @USAGE: [repo_uri]
+# @RETURN: ESVN_WC_URL, ESVN_WC_REVISION and ESVN_WC_PATH
+# @DESCRIPTION:
+# Get svn info for the specified repo_uri. The default repo_uri is ESVN_REPO_URI.
#
-# the working copy information on the specified repository URI are set to
+# The working copy information on the specified repository URI are set to
# ESVN_WC_* variables.
-#
-# the available variables:
-# ESVN_WC_URL
-# ESVN_WC_REVISION
-# ESVN_WC_PATH
-#
-# @param $1 - repository URI. default is ESVN_REPO_URI.
-#
-function subversion_wc_info() {
-
+subversion_wc_info() {
local repo_uri="$(subversion__get_repository_uri "${1}")"
local wc_path="$(subversion__get_wc_path "${repo_uri}")"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
debug-print "${FUNCNAME}: wc_path = ${wc_path}"
- if [[ ! -d "${wc_path}" ]]; then
+ if [[ ! -d ${wc_path} ]]; then
return 1
fi
@@ -306,52 +289,44 @@
done
export ESVN_WC_PATH="${wc_path}"
-
}
-
## -- Private Functions
-
## -- subversion__svn_info() ------------------------------------------------- #
#
-# @param $1 - a target.
-# @param $2 - a key name.
+# param $1 - a target.
+# param $2 - a key name.
#
-function subversion__svn_info() {
-
+subversion__svn_info() {
local target="${1}"
local key="${2}"
env LC_ALL=C svn info "${target}" | grep -i "^${key}" | cut -d" " -f2-
-
}
-
## -- subversion__get_repository_uri() --------------------------------------- #
#
-# @param $1 - a repository URI.
-# @param $2 - a peg revision is deleted from a return value if this is
+# param $1 - a repository URI.
+# param $2 - a peg revision is deleted from a return value if this is
# specified.
-#
-function subversion__get_repository_uri() {
-
+subversion__get_repository_uri() {
local repo_uri="${1:-${ESVN_REPO_URI}}"
local remove_peg_revision="${2}"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
debug-print "${FUNCNAME}: remove_peg_revision = ${remove_peg_revision}"
- if [[ -z "${repo_uri}" ]]; then
+ if [[ -z ${repo_uri} ]]; then
die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
fi
# delete trailing slash
- if [[ -z "${repo_uri##*/}" ]]; then
+ if [[ -z ${repo_uri##*/} ]]; then
repo_uri="${repo_uri%/}"
fi
- if [[ -n "${remove_peg_revision}" ]]; then
+ if [[ -n ${remove_peg_revision} ]]; then
if subversion__has_peg_revision "${repo_uri}"; then
repo_uri="${repo_uri%@*}"
@@ -361,37 +336,29 @@
fi
echo "${repo_uri}"
-
}
-
## -- subversion__get_wc_path() ---------------------------------------------- #
#
-# @param $1 - a repository URI.
-#
-function subversion__get_wc_path() {
-
+# param $1 - a repository URI.
+subversion__get_wc_path() {
local repo_uri="$(subversion__get_repository_uri "${1}" 1)"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
echo "${ESVN_STORE_DIR}/${ESVN_PROJECT}/${repo_uri##*/}"
-
}
-
## -- subversion__has_peg_revision() ----------------------------------------- #
#
-# @param $1 - a repository URI.
-#
-function subversion__has_peg_revision() {
-
+# param $1 - a repository URI.
+subversion__has_peg_revision() {
local repo_uri="${1}"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
# repo_uri has peg revision ?
- if [[ "${repo_uri}" != *@* ]]; then
+ if [[ ${repo_uri} != *@* ]]; then
debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
return 1
fi
@@ -416,16 +383,11 @@
debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
return 0
-
}
-
## -- subversion__to_upper_case() ----------------------------------------- #
#
-# @param $@ - the strings to upper case.
-#
-function subversion__to_upper_case() {
-
+# param $@ - the strings to upper case.
+subversion__to_upper_case() {
echo "${@}" | tr "[:lower:]" "[:upper:]"
-
}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-20 17:55 Doug Klima (cardoe)
0 siblings, 0 replies; 27+ messages in thread
From: Doug Klima (cardoe) @ 2008-02-20 17:55 UTC (permalink / raw
To: gentoo-commits
cardoe 08/02/20 17:55:28
Modified: subversion.eclass
Log:
Add ESVN_REVISION support. Remove problematic to_upper function. Provide revision data to user. Provide more working copy info via ESVN_WC_* variables. All this couldn't have been done without kojiro's help.
Revision Changes Path
1.47 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.47&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.47&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.46&r2=1.47
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- subversion.eclass 20 Feb 2008 17:11:34 -0000 1.46
+++ subversion.eclass 20 Feb 2008 17:55:27 -0000 1.47
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.46 2008/02/20 17:11:34 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.47 2008/02/20 17:55:27 cardoe Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -63,6 +63,16 @@
# to peg to a specific revision, append @REV to the repo's uri
ESVN_REPO_URI="${ESVN_REPO_URI:-}"
+# @ECLASS-VARIABLE: ESVN_REVISION
+# @DESCRIPTION:
+# User configurable revision checkout or update to from the repository
+#
+# Useful for live svn or trunk svn ebuilds allowing the user to peg
+# to a specific revision
+#
+# Note: This should never be set in an ebuild!
+ESVN_REVISION="${ESVN_REVISION:-}"
+
# @ECLASS-VARIABLE: ESVN_PROJECT
# @DESCRIPTION:
# project name of your ebuild (= name space)
@@ -119,9 +129,12 @@
# repo_uri - a repository URI. default is ESVN_REPO_URI.
# destination - a check out path in S.
subversion_fetch() {
- local repo_uri="$(subversion__get_repository_uri "${1}")"
+ local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
+ local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
local S_dest="${2}"
+ [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
+
# check for the protocol
local protocol="${repo_uri%%:*}"
@@ -155,6 +168,13 @@
local wc_path="$(subversion__get_wc_path "${repo_uri}")"
local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
+ [[ -n "${revision}" ]] && options="${options} -r ${revision}"
+
+ if [[ "${ESVN_OPTIONS}" = *-r* ]]; then
+ ewarn "\${ESVN_OPTIONS} contains -r, this usage is unsupported. Please"
+ ewarn "see \${ESVN_REPO_URI}"
+ fi
+
debug-print "${FUNCNAME}: wc_path = \"${wc_path}\""
debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
debug-print "${FUNCNAME}: options = \"${options}\""
@@ -162,7 +182,7 @@
if [[ ! -d ${wc_path}/.svn ]]; then
# first check out
einfo "subversion check out start -->"
- einfo " repository: ${repo_uri}"
+ einfo " repository: ${repo_uri}${revision:+@}${revision}"
debug-print "${FUNCNAME}: ${ESVN_FETCH_CMD} ${options} ${repo_uri}"
@@ -173,13 +193,13 @@
else
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
- if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}" 1) ]]; then
+ if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
die "${ESVN}: ESVN_REPO_URI (or specified URI) and working copy's URL are not matched."
fi
# update working copy
einfo "subversion update start -->"
- einfo " repository: ${repo_uri}"
+ einfo " repository: ${repo_uri}${revision:+@}${revision}"
debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
@@ -265,7 +285,7 @@
# @FUNCTION: subversion_wc_info
# @USAGE: [repo_uri]
-# @RETURN: ESVN_WC_URL, ESVN_WC_REVISION and ESVN_WC_PATH
+# @RETURN: ESVN_WC_URL, ESVN_WC_ROOT, ESVN_WC_UUID, ESVN_WC_REVISION and ESVN_WC_PATH
# @DESCRIPTION:
# Get svn info for the specified repo_uri. The default repo_uri is ESVN_REPO_URI.
#
@@ -282,12 +302,10 @@
return 1
fi
- local k
-
- for k in url revision; do
- export ESVN_WC_$(subversion__to_upper_case "${k}")="$(subversion__svn_info "${wc_path}" "${k}")"
- done
-
+ export ESVN_WC_URL="$(subversion__svn_info "${wc_path}" "URL")"
+ export ESVN_WC_ROOT="$(subversion__svn_info "${wc_path}" "Repository Root")"
+ export ESVN_WC_UUID="$(subversion__svn_info "${wc_path}" "Repository UUID")"
+ export ESVN_WC_REVISION="$(subversion__svn_info "${wc_path}" "Revision")"
export ESVN_WC_PATH="${wc_path}"
}
@@ -308,14 +326,10 @@
## -- subversion__get_repository_uri() --------------------------------------- #
#
# param $1 - a repository URI.
-# param $2 - a peg revision is deleted from a return value if this is
-# specified.
subversion__get_repository_uri() {
- local repo_uri="${1:-${ESVN_REPO_URI}}"
- local remove_peg_revision="${2}"
+ local repo_uri="${1}"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
- debug-print "${FUNCNAME}: remove_peg_revision = ${remove_peg_revision}"
if [[ -z ${repo_uri} ]]; then
die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
@@ -326,14 +340,7 @@
repo_uri="${repo_uri%/}"
fi
- if [[ -n ${remove_peg_revision} ]]; then
- if subversion__has_peg_revision "${repo_uri}"; then
- repo_uri="${repo_uri%@*}"
-
- debug-print "${FUNCNAME}: repo_uri has a peg revision"
- debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
- fi
- fi
+ repo_uri="${repo_uri%@*}"
echo "${repo_uri}"
}
@@ -342,17 +349,17 @@
#
# param $1 - a repository URI.
subversion__get_wc_path() {
- local repo_uri="$(subversion__get_repository_uri "${1}" 1)"
+ local repo_uri="$(subversion__get_repository_uri "${1}")"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
echo "${ESVN_STORE_DIR}/${ESVN_PROJECT}/${repo_uri##*/}"
}
-## -- subversion__has_peg_revision() ----------------------------------------- #
+## -- subversion__get_peg_revision() ----------------------------------------- #
#
# param $1 - a repository URI.
-subversion__has_peg_revision() {
+subversion__get_peg_revision() {
local repo_uri="${1}"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
@@ -360,34 +367,12 @@
# repo_uri has peg revision ?
if [[ ${repo_uri} != *@* ]]; then
debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
- return 1
fi
-
- local peg_rev="${repo_uri##*@}"
-
- case "$(subversion__to_upper_case "${peg_rev}")" in
- [[:digit:]]*)
- # NUMBER
- ;;
- HEAD|BASE|COMMITED|PREV)
- ;;
- {[^}]*})
- # DATE
- ;;
- *)
- debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
- return 1
- ;;
- esac
+
+ local peg_rev=
+ [[ ${repo_uri} = *@* ]] && peg_rev="${repo_uri##*@}"
debug-print "${FUNCNAME}: peg_rev = ${peg_rev}"
- return 0
-}
-
-## -- subversion__to_upper_case() ----------------------------------------- #
-#
-# param $@ - the strings to upper case.
-subversion__to_upper_case() {
- echo "${@}" | tr "[:lower:]" "[:upper:]"
+ echo "${peg_rev}"
}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-20 19:18 Doug Klima (cardoe)
0 siblings, 0 replies; 27+ messages in thread
From: Doug Klima (cardoe) @ 2008-02-20 19:18 UTC (permalink / raw
To: gentoo-commits
cardoe 08/02/20 19:18:54
Modified: subversion.eclass
Log:
add ESVN_SWITCH_CMD and use svn switch as necessary
Revision Changes Path
1.48 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.48&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.48&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.47&r2=1.48
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- subversion.eclass 20 Feb 2008 17:55:27 -0000 1.47
+++ subversion.eclass 20 Feb 2008 19:18:53 -0000 1.48
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.47 2008/02/20 17:55:27 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.48 2008/02/20 19:18:53 cardoe Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -42,6 +42,11 @@
# subversion update command
ESVN_UPDATE_CMD="svn update"
+# @ECLASS-VARIABLE: ESVN_SWITCH_CMD
+# @DESCRIPTION:
+# subversion switch command
+ESVN_SWITCH_CMD="svn switch"
+
# @ECLASS-VARIABLE: ESVN_OPTIONS
# @DESCRIPTION:
# the options passed to checkout or update. If you want a specific revision see
@@ -194,17 +199,24 @@
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
- die "${ESVN}: ESVN_REPO_URI (or specified URI) and working copy's URL are not matched."
- fi
+ einfo "suversion switch start -->"
+ einfo " old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
+ einfo " new repository: ${repo_uri}${revision:+@}${revision}"
- # update working copy
- einfo "subversion update start -->"
- einfo " repository: ${repo_uri}${revision:+@}${revision}"
+ debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
- debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
+ cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
+ ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update from ${repo_uri}"
+ else
+ # update working copy
+ einfo "subversion update start -->"
+ einfo " repository: ${repo_uri}${revision:+@}${revision}"
- cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
- ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update from ${repo_uri}."
+ debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
+
+ cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
+ ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update from ${repo_uri}."
+ fi
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-20 20:32 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-20 20:32 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/20 20:32:01
Modified: subversion.eclass
Log:
Add support for ESVN_OFFLINE and ESCM_OFFLINE.
Revision Changes Path
1.49 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.49&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.49&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.48&r2=1.49
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- subversion.eclass 20 Feb 2008 19:18:53 -0000 1.48
+++ subversion.eclass 20 Feb 2008 20:32:00 -0000 1.49
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.48 2008/02/20 19:18:53 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.49 2008/02/20 20:32:00 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -124,6 +124,13 @@
# don't export the working copy to S.
ESVN_RESTRICT="${ESVN_RESTRICT:-}"
+# @ECLASS-VARIABLE: ESVN_OFFLINE
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic updating of
+# an svn source tree. This is intended to be set outside the subversion source
+# tree by users.
+ESVN_OFFLINE="${ESVN_OFFLINE:-${ESCM_OFFLINE}}"
+
# @FUNCTION: subversion_fetch
# @USAGE: [repo_uri] [destination]
# @DESCRIPTION:
@@ -195,6 +202,12 @@
cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch from ${repo_uri}."
+ elif [[ -n ${ESVN_OFFLINE} ]]; then
+ subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
+ if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
+ die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
+ fi
+ einfo "Fetching disabled: Using existing repository copy"
else
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
@@ -380,7 +393,7 @@
if [[ ${repo_uri} != *@* ]]; then
debug-print "${FUNCNAME}: repo_uri does not have a peg revision."
fi
-
+
local peg_rev=
[[ ${repo_uri} = *@* ]] && peg_rev="${repo_uri##*@}"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-20 20:36 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-20 20:36 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/20 20:36:31
Modified: subversion.eclass
Log:
Add support for ESCM_LOGDIR using pkg_preinst.
Revision Changes Path
1.50 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.49&r2=1.50
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- subversion.eclass 20 Feb 2008 20:32:00 -0000 1.49
+++ subversion.eclass 20 Feb 2008 20:36:30 -0000 1.50
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.49 2008/02/20 20:32:00 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.50 2008/02/20 20:36:30 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -20,7 +20,7 @@
ESVN="${ECLASS}"
-EXPORT_FUNCTIONS src_unpack
+EXPORT_FUNCTIONS src_unpack pkg_preinst
DESCRIPTION="Based on the ${ECLASS} eclass"
@@ -131,6 +131,14 @@
# tree by users.
ESVN_OFFLINE="${ESVN_OFFLINE:-${ESCM_OFFLINE}}"
+# @ECLASS-VARIABLE: ESCM_LOGDIR
+# @DESCRIPTION:
+# User configuration variable. If set to a path such as e.g. /var/log/scm any
+# package inheriting from subversion.eclass will record svn revision to
+# ${CATEGORY}/${PN}.log in that path in pkg_preinst. This is not supposed to be
+# set by ebuilds/eclasses. It defaults to empty so users need to opt in.
+ESCM_LOGDIR="${ESCM_LOGDIR:=}"
+
# @FUNCTION: subversion_fetch
# @USAGE: [repo_uri] [destination]
# @DESCRIPTION:
@@ -401,3 +409,26 @@
echo "${peg_rev}"
}
+
+# @FUNCTION: subversion_pkg_preinst
+# @DESCRIPTION:
+# Log the svn revision of source code. Doing this in pkg_preinst because we
+# want the logs to stick around if packages are uninstalled without messing with
+# config protection.
+subversion_pkg_preinst() {
+ local pkgdate=$(date "+%Y%m%d %H:%M:%S")
+ subversion_wc_info
+ if [[ -n ${ESCM_LOGDIR} ]]; then
+ local dir="${ROOT}/${ESCM_LOGDIR}/${CATEGORY}"
+ if [[ ! -d ${dir} ]]; then
+ mkdir -p "${dir}" || \
+ eerror "Failed to create '${dir}' for logging svn revision to '${PORTDIR_SCM}'"
+ fi
+ local logmessage="svn: ${pkgdate} - ${PF}:${SLOT} was merged at revision ${ESVN_WC_REVISION}"
+ if [[ -d ${dir} ]]; then
+ echo "${logmessage}" >> "${dir}/${PN}.log"
+ else
+ eerror "Could not log the message '${logmessage}' to '${dir}/${PN}.log'"
+ fi
+ fi
+}
\ No newline at end of file
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-20 22:28 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-20 22:28 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/20 22:28:49
Modified: subversion.eclass
Log:
As kindly pointed out by David Leverton there is no requirement to define ESVN_REPO_URI before inheriting this eclass. On the other hand subversion_src_fetch must die if repo_uri is unset.
Revision Changes Path
1.51 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.50&r2=1.51
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- subversion.eclass 20 Feb 2008 20:36:30 -0000 1.50
+++ subversion.eclass 20 Feb 2008 22:28:49 -0000 1.51
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.50 2008/02/20 20:36:30 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.51 2008/02/20 22:28:49 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -13,8 +13,6 @@
# @DESCRIPTION:
# The subversion eclass provides functions to fetch, patch and bootstrap
# software sources from subversion repositories.
-#
-# You must define the ESVN_REPO_URI variable before inheriting this eclass.
inherit eutils
@@ -153,6 +151,10 @@
local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
local S_dest="${2}"
+ if [[ -z ${repo_uri} ]]; then
+ die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
+ fi
+
[[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
# check for the protocol
@@ -431,4 +433,4 @@
eerror "Could not log the message '${logmessage}' to '${dir}/${PN}.log'"
fi
fi
-}
\ No newline at end of file
+}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-20 22:35 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-20 22:35 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/20 22:35:41
Modified: subversion.eclass
Log:
Add support for ESVN_UP_FREQ.
Revision Changes Path
1.52 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.51&r2=1.52
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- subversion.eclass 20 Feb 2008 22:28:49 -0000 1.51
+++ subversion.eclass 20 Feb 2008 22:35:40 -0000 1.52
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.51 2008/02/20 22:28:49 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.52 2008/02/20 22:35:40 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -129,6 +129,13 @@
# tree by users.
ESVN_OFFLINE="${ESVN_OFFLINE:-${ESCM_OFFLINE}}"
+# @ECLASS-VARIABLE: ESVN_UP_FREQ
+# @DESCRIPTION:
+# Set the minimum number of hours between svn up'ing in any given svn module. This is particularly
+# useful for split KDE ebuilds where we want to ensure that all submodules are compiled for the same
+# revision. It should also be kept user overrideable.
+ESVN_UP_FREQ="${ESVN_UP_FREQ:=}"
+
# @ECLASS-VARIABLE: ESCM_LOGDIR
# @DESCRIPTION:
# User configuration variable. If set to a path such as e.g. /var/log/scm any
@@ -221,26 +228,37 @@
else
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
- if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
- einfo "suversion switch start -->"
- einfo " old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
- einfo " new repository: ${repo_uri}${revision:+@}${revision}"
+ local esvn_up_freq=
+ if [[ -n ${ESVN_UP_FREQ} ]]; then
+ if [[ -n ${ESVN_UP_FREQ//[[:digit:]]} ]]; then
+ die "${ESVN}: ESVN_UP_FREQ must be an integer value corresponding to the minimum number of hours between svn up."
+ elif [[ -z $(find "${wc_path}/.svn/entries" -mmin "+$((ESVN_UP_FREQ*60))") ]]; then
+ einfo "Fetching disabled since ${ESVN_UP_FREQ} hours hasn't passed since last update."
+ esvn_up_freq=no_update
+ fi
+ fi
- debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
+ if [[ -z ${esvn_up_freq} ]]; then
+ if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
+ einfo "suversion switch start -->"
+ einfo " old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
+ einfo " new repository: ${repo_uri}${revision:+@}${revision}"
- cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
- ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update from ${repo_uri}"
- else
- # update working copy
- einfo "subversion update start -->"
- einfo " repository: ${repo_uri}${revision:+@}${revision}"
+ debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
- debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
+ cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
+ ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update from ${repo_uri}"
+ else
+ # update working copy
+ einfo "subversion update start -->"
+ einfo " repository: ${repo_uri}${revision:+@}${revision}"
- cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
- ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update from ${repo_uri}."
- fi
+ debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
+ cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
+ ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update from ${repo_uri}."
+ fi
+ fi
fi
einfo " working copy: ${wc_path}"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-21 13:38 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-21 13:38 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/21 13:38:37
Modified: subversion.eclass
Log:
Unbreak subversion__get_repository_uri(). Warn when ESVN_OFFLINE is set while there is no checkout.
Revision Changes Path
1.53 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.53&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.53&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.52&r2=1.53
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- subversion.eclass 20 Feb 2008 22:35:40 -0000 1.52
+++ subversion.eclass 21 Feb 2008 13:38:36 -0000 1.53
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.52 2008/02/20 22:35:40 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.53 2008/02/21 13:38:36 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -154,7 +154,7 @@
# repo_uri - a repository URI. default is ESVN_REPO_URI.
# destination - a check out path in S.
subversion_fetch() {
- local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
+ local repo_uri="$(subversion__get_repository_uri "${1}")"
local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
local S_dest="${2}"
@@ -209,6 +209,9 @@
debug-print "${FUNCNAME}: options = \"${options}\""
if [[ ! -d ${wc_path}/.svn ]]; then
+ if [[ -n ${ESVN_OFFLINE} ]]; then
+ ewarn "ESVN_OFFLINE cannot be used when the there is no existing checkout."
+ fi
# first check out
einfo "subversion check out start -->"
einfo " repository: ${repo_uri}${revision:+@}${revision}"
@@ -380,7 +383,7 @@
#
# param $1 - a repository URI.
subversion__get_repository_uri() {
- local repo_uri="${1}"
+ local repo_uri="${1:-${ESVN_REPO_URI}}"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-21 16:01 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-21 16:01 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/21 16:01:53
Modified: subversion.eclass
Log:
Move use of ESVN_REPO_URI to public functions only. Patch kindly provided by Doug Klima (Cardoe).
Revision Changes Path
1.54 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.54&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.54&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.53&r2=1.54
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- subversion.eclass 21 Feb 2008 13:38:36 -0000 1.53
+++ subversion.eclass 21 Feb 2008 16:01:53 -0000 1.54
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.53 2008/02/21 13:38:36 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.54 2008/02/21 16:01:53 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -154,7 +154,7 @@
# repo_uri - a repository URI. default is ESVN_REPO_URI.
# destination - a check out path in S.
subversion_fetch() {
- local repo_uri="$(subversion__get_repository_uri "${1}")"
+ local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
local S_dest="${2}"
@@ -348,7 +348,7 @@
# The working copy information on the specified repository URI are set to
# ESVN_WC_* variables.
subversion_wc_info() {
- local repo_uri="$(subversion__get_repository_uri "${1}")"
+ local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
local wc_path="$(subversion__get_wc_path "${repo_uri}")"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
@@ -383,7 +383,7 @@
#
# param $1 - a repository URI.
subversion__get_repository_uri() {
- local repo_uri="${1:-${ESVN_REPO_URI}}"
+ local repo_uri="${1}"
debug-print "${FUNCNAME}: repo_uri = ${repo_uri}"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-21 16:33 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-21 16:33 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/21 16:33:09
Modified: subversion.eclass
Log:
Add support for an optional repo_uri argument for pkg_preinst.
Revision Changes Path
1.55 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.55&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.55&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.54&r2=1.55
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- subversion.eclass 21 Feb 2008 16:01:53 -0000 1.54
+++ subversion.eclass 21 Feb 2008 16:33:09 -0000 1.55
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.54 2008/02/21 16:01:53 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.55 2008/02/21 16:33:09 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -434,13 +434,14 @@
}
# @FUNCTION: subversion_pkg_preinst
+# @USAGE: [repo_uri]
# @DESCRIPTION:
# Log the svn revision of source code. Doing this in pkg_preinst because we
# want the logs to stick around if packages are uninstalled without messing with
# config protection.
subversion_pkg_preinst() {
local pkgdate=$(date "+%Y%m%d %H:%M:%S")
- subversion_wc_info
+ subversion_wc_info "${1:-${ESVN_REPO_URI}}"
if [[ -n ${ESCM_LOGDIR} ]]; then
local dir="${ROOT}/${ESCM_LOGDIR}/${CATEGORY}"
if [[ ! -d ${dir} ]]; then
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-02-27 12:54 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-02-27 12:54 UTC (permalink / raw
To: gentoo-commits
zlin 08/02/27 12:54:36
Modified: subversion.eclass
Log:
Mention which revision is used when fetching is disabled.
Revision Changes Path
1.56 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.56&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.56&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.55&r2=1.56
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- subversion.eclass 21 Feb 2008 16:33:09 -0000 1.55
+++ subversion.eclass 27 Feb 2008 12:54:35 -0000 1.56
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.55 2008/02/21 16:33:09 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.56 2008/02/27 12:54:35 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -227,7 +227,7 @@
if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
fi
- einfo "Fetching disabled: Using existing repository copy"
+ einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}."
else
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
@@ -236,7 +236,8 @@
if [[ -n ${ESVN_UP_FREQ//[[:digit:]]} ]]; then
die "${ESVN}: ESVN_UP_FREQ must be an integer value corresponding to the minimum number of hours between svn up."
elif [[ -z $(find "${wc_path}/.svn/entries" -mmin "+$((ESVN_UP_FREQ*60))") ]]; then
- einfo "Fetching disabled since ${ESVN_UP_FREQ} hours hasn't passed since last update."
+ einfo "Fetching disabled since ${ESVN_UP_FREQ} hours has not passed since last update."
+ einfo "Using existing repository copy at revision ${ESVN_WC_REVISION}."
esvn_up_freq=no_update
fi
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-03-06 9:23 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-03-06 9:23 UTC (permalink / raw
To: gentoo-commits
zlin 08/03/06 09:23:39
Modified: subversion.eclass
Log:
Typo.
Revision Changes Path
1.57 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.57&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.57&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.56&r2=1.57
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- subversion.eclass 27 Feb 2008 12:54:35 -0000 1.56
+++ subversion.eclass 6 Mar 2008 09:23:39 -0000 1.57
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.56 2008/02/27 12:54:35 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.57 2008/03/06 09:23:39 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -244,7 +244,7 @@
if [[ -z ${esvn_up_freq} ]]; then
if [[ ${ESVN_WC_URL} != $(subversion__get_repository_uri "${repo_uri}") ]]; then
- einfo "suversion switch start -->"
+ einfo "subversion switch start -->"
einfo " old repository: ${ESVN_WC_URL}@${ESVN_WC_REVISION}"
einfo " new repository: ${repo_uri}${revision:+@}${revision}"
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-04-30 18:57 Benedikt Boehm (hollow)
0 siblings, 0 replies; 27+ messages in thread
From: Benedikt Boehm (hollow) @ 2008-04-30 18:57 UTC (permalink / raw
To: gentoo-commits
hollow 08/04/30 18:57:11
Modified: subversion.eclass
Log:
add support for subversion 1.5 webdav changes, bug #219509
Revision Changes Path
1.58 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.58&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.58&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.57&r2=1.58
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- subversion.eclass 6 Mar 2008 09:23:39 -0000 1.57
+++ subversion.eclass 30 Apr 2008 18:57:10 -0000 1.58
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.57 2008/03/06 09:23:39 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.58 2008/04/30 18:57:10 hollow Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -169,12 +169,14 @@
case "${protocol}" in
http|https)
- if built_with_use dev-util/subversion nowebdav; then
+ if ! built_with_use --missing true -o dev-util/subversion webdav-neon webdav-serf || \
+ built_with_use --missing false dev-util/subversion nowebdav ; then
echo
eerror "In order to emerge this package, you need to"
- eerror "re-emerge subversion with USE=-nowebdav"
+ eerror "reinstall Subversion with support for WebDAV."
+ eerror "Subversion requires either Neon or Serf to support WebDAV."
echo
- die "${ESVN}: please run 'USE=-nowebdav emerge subversion'"
+ die "${ESVN}: reinstall Subversion with support for WebDAV."
fi
;;
svn|svn+ssh)
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-05-15 13:27 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-05-15 13:27 UTC (permalink / raw
To: gentoo-commits
zlin 08/05/15 13:27:40
Modified: subversion.eclass
Log:
Print checkout dir when svn update fails.
Revision Changes Path
1.59 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.59&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.59&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.58&r2=1.59
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- subversion.eclass 30 Apr 2008 18:57:10 -0000 1.58
+++ subversion.eclass 15 May 2008 13:27:40 -0000 1.59
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.58 2008/04/30 18:57:10 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.59 2008/05/15 13:27:40 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -222,7 +222,7 @@
mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
- ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch from ${repo_uri}."
+ ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
elif [[ -n ${ESVN_OFFLINE} ]]; then
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
@@ -253,7 +253,7 @@
debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
- ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update from ${repo_uri}"
+ ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}"
else
# update working copy
einfo "subversion update start -->"
@@ -262,7 +262,7 @@
debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
- ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update from ${repo_uri}."
+ ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
fi
fi
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2008-05-27 9:49 Bo Oersted Andresen (zlin)
0 siblings, 0 replies; 27+ messages in thread
From: Bo Oersted Andresen (zlin) @ 2008-05-27 9:49 UTC (permalink / raw
To: gentoo-commits
zlin 08/05/27 09:49:10
Modified: subversion.eclass
Log:
Make sure S exists thanks to Peter Volkov (pva) on bug #223813.
Revision Changes Path
1.60 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.60&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.60&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.59&r2=1.60
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- subversion.eclass 15 May 2008 13:27:40 -0000 1.59
+++ subversion.eclass 27 May 2008 09:49:09 -0000 1.60
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.59 2008/05/15 13:27:40 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.60 2008/05/27 09:49:09 zlin Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -273,6 +273,7 @@
cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
local S="${S}/${S_dest}"
+ mkdir -p "${S}"
# export to the ${WORKDIR}
#* "svn export" has a bug. see http://bugs.gentoo.org/119236
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2009-03-22 1:56 Arfrever Frehtes Taifersar Arahesis (arfrever)
0 siblings, 0 replies; 27+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-03-22 1:56 UTC (permalink / raw
To: gentoo-commits
arfrever 09/03/22 01:56:34
Modified: subversion.eclass
Log:
Update for compatibility with Subversion 1.6.
Revision Changes Path
1.61 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.61&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.61&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.60&r2=1.61
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- subversion.eclass 27 May 2008 09:49:09 -0000 1.60
+++ subversion.eclass 22 Mar 2009 01:56:34 -0000 1.61
@@ -1,11 +1,12 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.60 2008/05/27 09:49:09 zlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.61 2009/03/22 01:56:34 arfrever Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
# Akinori Hattori <hattya@gentoo.org>
# Bo Ørsted Andresen <zlin@gentoo.org>
+# Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
#
# Original Author: Akinori Hattori <hattya@gentoo.org>
#
@@ -206,6 +207,10 @@
ewarn "see \${ESVN_REPO_URI}"
fi
+ if has_version ">=dev-util/subversion-1.6.0"; then
+ options="${options} --config-option=config:auth:password-stores="
+ fi
+
debug-print "${FUNCNAME}: wc_path = \"${wc_path}\""
debug-print "${FUNCNAME}: ESVN_OPTIONS = \"${ESVN_OPTIONS}\""
debug-print "${FUNCNAME}: options = \"${options}\""
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2009-04-26 1:57 Arfrever Frehtes Taifersar Arahesis (arfrever)
0 siblings, 0 replies; 27+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-04-26 1:57 UTC (permalink / raw
To: gentoo-commits
arfrever 09/04/26 01:57:14
Modified: subversion.eclass
Log:
Run 'svn cleanup' to automatically upgrade working copies.
Revision Changes Path
1.62 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.62&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.62&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.61&r2=1.62
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- subversion.eclass 22 Mar 2009 01:56:34 -0000 1.61
+++ subversion.eclass 26 Apr 2009 01:57:14 -0000 1.62
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.61 2009/03/22 01:56:34 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.62 2009/04/26 01:57:14 arfrever Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -230,12 +230,14 @@
${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
elif [[ -n ${ESVN_OFFLINE} ]]; then
+ svn cleanup "${wc_path}"
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
fi
einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}."
else
+ svn cleanup "${wc_path}"
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
local esvn_up_freq=
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2009-04-26 2:18 Arfrever Frehtes Taifersar Arahesis (arfrever)
0 siblings, 0 replies; 27+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-04-26 2:18 UTC (permalink / raw
To: gentoo-commits
arfrever 09/04/26 02:18:09
Modified: subversion.eclass
Log:
Support ESVN_USER and ESVN_PASSWORD variables.
Revision Changes Path
1.63 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.63&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.63&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.62&r2=1.63
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- subversion.eclass 26 Apr 2009 01:57:14 -0000 1.62
+++ subversion.eclass 26 Apr 2009 02:18:09 -0000 1.63
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.62 2009/04/26 01:57:14 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.63 2009/04/26 02:18:09 arfrever Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -77,6 +77,16 @@
# Note: This should never be set in an ebuild!
ESVN_REVISION="${ESVN_REVISION:-}"
+# @ECLASS-VARIABLE: ESVN_USER
+# @DESCRIPTION:
+# User name
+ESVN_USER="${ESVN_USER:-}"
+
+# @ECLASS-VARIABLE: ESVN_PASSWORD
+# @DESCRIPTION:
+# Password
+ESVN_PASSWORD="${ESVN_PASSWORD:-}"
+
# @ECLASS-VARIABLE: ESVN_PROJECT
# @DESCRIPTION:
# project name of your ebuild (= name space)
@@ -171,7 +181,7 @@
case "${protocol}" in
http|https)
if ! built_with_use --missing true -o dev-util/subversion webdav-neon webdav-serf || \
- built_with_use --missing false dev-util/subversion nowebdav ; then
+ built_with_use --missing false dev-util/subversion nowebdav; then
echo
eerror "In order to emerge this package, you need to"
eerror "reinstall Subversion with support for WebDAV."
@@ -217,7 +227,7 @@
if [[ ! -d ${wc_path}/.svn ]]; then
if [[ -n ${ESVN_OFFLINE} ]]; then
- ewarn "ESVN_OFFLINE cannot be used when the there is no existing checkout."
+ ewarn "ESVN_OFFLINE cannot be used when there is no existing checkout."
fi
# first check out
einfo "subversion check out start -->"
@@ -227,7 +237,11 @@
mkdir -p "${ESVN_PROJECT}" || die "${ESVN}: can't mkdir ${ESVN_PROJECT}."
cd "${ESVN_PROJECT}" || die "${ESVN}: can't chdir to ${ESVN_PROJECT}"
- ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+ if [[ -n "${ESVN_USER}" ]]; then
+ ${ESVN_FETCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+ else
+ ${ESVN_FETCH_CMD} ${options} "${repo_uri}" || die "${ESVN}: can't fetch to ${wc_path} from ${repo_uri}."
+ fi
elif [[ -n ${ESVN_OFFLINE} ]]; then
svn cleanup "${wc_path}"
@@ -260,7 +274,11 @@
debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options} ${repo_uri}"
cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
- ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}"
+ if [[ -n "${ESVN_USER}" ]]; then
+ ${ESVN_SWITCH_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+ else
+ ${ESVN_SWITCH_CMD} ${options} ${repo_uri} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+ fi
else
# update working copy
einfo "subversion update start -->"
@@ -269,7 +287,11 @@
debug-print "${FUNCNAME}: ${ESVN_UPDATE_CMD} ${options}"
cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
- ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+ if [[ -n "${ESVN_USER}" ]]; then
+ ${ESVN_UPDATE_CMD} ${options} --username "${ESVN_USER}" --password "${ESVN_PASSWORD}" || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+ else
+ ${ESVN_UPDATE_CMD} ${options} || die "${ESVN}: can't update ${wc_path} from ${repo_uri}."
+ fi
fi
fi
fi
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2009-04-26 2:33 Arfrever Frehtes Taifersar Arahesis (arfrever)
0 siblings, 0 replies; 27+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-04-26 2:33 UTC (permalink / raw
To: gentoo-commits
arfrever 09/04/26 02:33:36
Modified: subversion.eclass
Log:
Update for EAPI="2".
Revision Changes Path
1.64 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.64&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.64&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.63&r2=1.64
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- subversion.eclass 26 Apr 2009 02:18:09 -0000 1.63
+++ subversion.eclass 26 Apr 2009 02:33:36 -0000 1.64
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.63 2009/04/26 02:18:09 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.64 2009/04/26 02:33:36 arfrever Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -19,7 +19,11 @@
ESVN="${ECLASS}"
-EXPORT_FUNCTIONS src_unpack pkg_preinst
+if has "${EAPI}" 0 1; then
+ EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
+else
+ EXPORT_FUNCTIONS src_unpack pkg_preinst
+fi
DESCRIPTION="Based on the ${ECLASS} eclass"
@@ -366,9 +370,18 @@
# @FUNCTION: subversion_src_unpack
# @DESCRIPTION:
-# default src_unpack. fetch and bootstrap.
+# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
subversion_src_unpack() {
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
+ if has "${EAPI}" 0 1; then
+ subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
+ fi
+}
+
+# @FUNCTION: subversion_src_prepare
+# @DESCRIPTION:
+# Default src_prepare. Bootstrap.
+subversion_src_prepare() {
subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2009-04-29 22:26 Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 27+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-29 22:26 UTC (permalink / raw
To: gentoo-commits
scarabeus 09/04/29 22:26:31
Modified: subversion.eclass
Log:
Update eapi2 issues reported by subversion eclass users. Agreed with yngwin to rather fix this fast and apologize maint. later.
Revision Changes Path
1.65 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.65&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.65&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.64&r2=1.65
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- subversion.eclass 26 Apr 2009 02:33:36 -0000 1.64
+++ subversion.eclass 29 Apr 2009 22:26:31 -0000 1.65
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.64 2009/04/26 02:33:36 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.65 2009/04/29 22:26:31 scarabeus Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -19,11 +19,13 @@
ESVN="${ECLASS}"
-if has "${EAPI}" 0 1; then
- EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
-else
- EXPORT_FUNCTIONS src_unpack pkg_preinst
-fi
+EXPORTED_FUNCTIONS="src_unpack pkg_preinst"
+case "${EAPI:-0}" in
+ 2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
+ 1|0) ;;
+ *) die "Unknown EAPI, Bug eclass maintainers." ;;
+esac
+EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
DESCRIPTION="Based on the ${ECLASS} eclass"
@@ -373,9 +375,7 @@
# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
subversion_src_unpack() {
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
- if has "${EAPI}" 0 1; then
- subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
- fi
+ has src_prepare ${EXPORTED_FUNCTIONS} || git_src_prepare
}
# @FUNCTION: subversion_src_prepare
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2009-04-29 22:47 Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 27+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2009-04-29 22:47 UTC (permalink / raw
To: gentoo-commits
scarabeus 09/04/29 22:47:08
Modified: subversion.eclass
Log:
Typo++. Well sometimes copy/pasto just does not work.
Revision Changes Path
1.66 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.66&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.66&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.65&r2=1.66
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- subversion.eclass 29 Apr 2009 22:26:31 -0000 1.65
+++ subversion.eclass 29 Apr 2009 22:47:08 -0000 1.66
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.65 2009/04/29 22:26:31 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.66 2009/04/29 22:47:08 scarabeus Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -375,7 +375,7 @@
# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
subversion_src_unpack() {
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
- has src_prepare ${EXPORTED_FUNCTIONS} || git_src_prepare
+ has src_prepare ${EXPORTED_FUNCTIONS} || subversion_src_prepare
}
# @FUNCTION: subversion_src_prepare
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2009-05-10 20:33 Arfrever Frehtes Taifersar Arahesis (arfrever)
0 siblings, 0 replies; 27+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2009-05-10 20:33 UTC (permalink / raw
To: gentoo-commits
arfrever 09/05/10 20:33:38
Modified: subversion.eclass
Log:
Add possibility of not including Subversion in DEPEND.
Run 'svn upgrade' to automatically upgrade working copies.
Revision Changes Path
1.67 eclass/subversion.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.67&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?rev=1.67&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/subversion.eclass?r1=1.66&r2=1.67
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- subversion.eclass 29 Apr 2009 22:47:08 -0000 1.66
+++ subversion.eclass 10 May 2009 20:33:38 -0000 1.67
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.66 2009/04/29 22:47:08 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.67 2009/05/10 20:33:38 arfrever Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -19,19 +19,24 @@
ESVN="${ECLASS}"
-EXPORTED_FUNCTIONS="src_unpack pkg_preinst"
case "${EAPI:-0}" in
- 2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
- 1|0) ;;
- *) die "Unknown EAPI, Bug eclass maintainers." ;;
+ 0|1)
+ EXPORT_FUNCTIONS src_unpack pkg_preinst
+ ;;
+ *)
+ EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
+ ;;
esac
-EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
DESCRIPTION="Based on the ${ECLASS} eclass"
-DEPEND="dev-util/subversion
+SUBVERSION_DEPEND="dev-util/subversion
net-misc/rsync"
+if [[ -z "${ESVN_DISABLE_DEPENDENCIES}" ]]; then
+ DEPEND="${SUBVERSION_DEPEND}"
+fi
+
# @ECLASS-VARIABLE: ESVN_STORE_DIR
# @DESCRIPTION:
# subversion sources store directory. Users may override this in /etc/make.conf
@@ -139,6 +144,12 @@
# don't export the working copy to S.
ESVN_RESTRICT="${ESVN_RESTRICT:-}"
+# @ECLASS-VARIABLE: ESVN_DISABLE_DEPENDENCIES
+# @DESCRIPTION:
+# Set this variable to a non-empty value to disable the automatic inclusion of
+# Subversion in dependencies.
+ESVN_DISABLE_DEPENDENCIES="${ESVN_DISABLE_DEPENDENCIES:-}"
+
# @ECLASS-VARIABLE: ESVN_OFFLINE
# @DESCRIPTION:
# Set this variable to a non-empty value to disable the automatic updating of
@@ -186,8 +197,7 @@
case "${protocol}" in
http|https)
- if ! built_with_use --missing true -o dev-util/subversion webdav-neon webdav-serf || \
- built_with_use --missing false dev-util/subversion nowebdav; then
+ if ! built_with_use -o dev-util/subversion webdav-neon webdav-serf; then
echo
eerror "In order to emerge this package, you need to"
eerror "reinstall Subversion with support for WebDAV."
@@ -250,14 +260,16 @@
fi
elif [[ -n ${ESVN_OFFLINE} ]]; then
- svn cleanup "${wc_path}"
+ svn upgrade "${wc_path}" &>/dev/null
+ svn cleanup "${wc_path}" &>/dev/null
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
if [[ -n ${ESVN_REVISION} && ${ESVN_REVISION} != ${ESVN_WC_REVISION} ]]; then
die "${ESVN}: You requested off-line updating and revision ${ESVN_REVISION} but only revision ${ESVN_WC_REVISION} is available locally."
fi
einfo "Fetching disabled: Using existing repository copy at revision ${ESVN_WC_REVISION}."
else
- svn cleanup "${wc_path}"
+ svn upgrade "${wc_path}" &>/dev/null
+ svn cleanup "${wc_path}" &>/dev/null
subversion_wc_info "${repo_uri}" || die "${ESVN}: unknown problem occurred while accessing working copy."
local esvn_up_freq=
@@ -375,7 +387,9 @@
# Default src_unpack. Fetch and, in older EAPIs, bootstrap.
subversion_src_unpack() {
subversion_fetch || die "${ESVN}: unknown problem occurred in subversion_fetch."
- has src_prepare ${EXPORTED_FUNCTIONS} || subversion_src_prepare
+ if has "${EAPI:-0}" 0 1; then
+ subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
+ fi
}
# @FUNCTION: subversion_src_prepare
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2010-06-22 18:34 Arfrever Frehtes Taifersar Arahesis (arfrever)
0 siblings, 0 replies; 27+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis (arfrever) @ 2010-06-22 18:34 UTC (permalink / raw
To: gentoo-commits
arfrever 10/06/22 18:34:29
Modified: subversion.eclass
Log:
dev-util/subversion renamed to dev-vcs/subversion.
Revision Changes Path
1.68 eclass/subversion.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.68&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.68&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?r1=1.67&r2=1.68
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- subversion.eclass 10 May 2009 20:33:38 -0000 1.67
+++ subversion.eclass 22 Jun 2010 18:34:29 -0000 1.68
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.67 2009/05/10 20:33:38 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.68 2010/06/22 18:34:29 arfrever Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -30,7 +30,7 @@
DESCRIPTION="Based on the ${ECLASS} eclass"
-SUBVERSION_DEPEND="dev-util/subversion
+SUBVERSION_DEPEND="dev-vcs/subversion
net-misc/rsync"
if [[ -z "${ESVN_DISABLE_DEPENDENCIES}" ]]; then
@@ -197,7 +197,7 @@
case "${protocol}" in
http|https)
- if ! built_with_use -o dev-util/subversion webdav-neon webdav-serf; then
+ if ! built_with_use -o dev-vcs/subversion webdav-neon webdav-serf; then
echo
eerror "In order to emerge this package, you need to"
eerror "reinstall Subversion with support for WebDAV."
@@ -233,7 +233,7 @@
ewarn "see \${ESVN_REPO_URI}"
fi
- if has_version ">=dev-util/subversion-1.6.0"; then
+ if has_version ">=dev-vcs/subversion-1.6.0"; then
options="${options} --config-option=config:auth:password-stores="
fi
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2010-12-19 14:51 Justin Lecher (jlec)
0 siblings, 0 replies; 27+ messages in thread
From: Justin Lecher (jlec) @ 2010-12-19 14:51 UTC (permalink / raw
To: gentoo-commits
jlec 10/12/19 14:51:47
Modified: subversion.eclass
Log:
Leaving ESVN_STORE_DIR after the subversion_src_unpack, so that subsequent commands act in not in ESVN_STORE_DIR
Revision Changes Path
1.69 eclass/subversion.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.69&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.69&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?r1=1.68&r2=1.69
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- subversion.eclass 22 Jun 2010 18:34:29 -0000 1.68
+++ subversion.eclass 19 Dec 2010 14:51:46 -0000 1.69
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.68 2010/06/22 18:34:29 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.69 2010/12/19 14:51:46 jlec Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -221,7 +221,7 @@
mkdir -p "${ESVN_STORE_DIR}" || die "${ESVN}: can't mkdir ${ESVN_STORE_DIR}."
fi
- cd "${ESVN_STORE_DIR}" || die "${ESVN}: can't chdir to ${ESVN_STORE_DIR}"
+ pushd "${ESVN_STORE_DIR}" > /dev/null || die "${ESVN}: can't chdir to ${ESVN_STORE_DIR}"
local wc_path="$(subversion__get_wc_path "${repo_uri}")"
local options="${ESVN_OPTIONS} --config-dir ${ESVN_STORE_DIR}/.subversion"
@@ -328,6 +328,8 @@
rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}."
fi
+ popd > /dev/null
+
echo
}
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2012-02-14 16:08 Mike Frysinger (vapier)
0 siblings, 0 replies; 27+ messages in thread
From: Mike Frysinger (vapier) @ 2012-02-14 16:08 UTC (permalink / raw
To: gentoo-commits
vapier 12/02/14 16:08:12
Modified: subversion.eclass
Log:
ESVN_UMASK: fix grammar and add useful documentation
Revision Changes Path
1.74 eclass/subversion.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.74&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.74&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?r1=1.73&r2=1.74
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- subversion.eclass 2 Feb 2012 03:17:56 -0000 1.73
+++ subversion.eclass 14 Feb 2012 16:08:11 -0000 1.74
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.73 2012/02/02 03:17:56 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.74 2012/02/14 16:08:11 vapier Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -158,8 +158,12 @@
# @ECLASS-VARIABLE: ESVN_UMASK
# @DESCRIPTION:
-# Set this variable to custom umask.
-# This is intended to be set by users.
+# Set this variable to a custom umask. This is intended to be set by users.
+# By setting this to something like 002, it can make life easier for people
+# who do development as non-root (but are in the portage group), and then
+# switch over to building with FEATURES=userpriv. Or vice-versa. Shouldn't
+# be a security issue here as anyone who has portage group write access
+# already can screw the system over in more creative ways.
ESVN_UMASK="${ESVN_UMASK:-${EVCS_UMASK}}"
# @ECLASS-VARIABLE: ESVN_UP_FREQ
^ permalink raw reply [flat|nested] 27+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass
@ 2014-01-07 1:59 Mike Gilbert (floppym)
0 siblings, 0 replies; 27+ messages in thread
From: Mike Gilbert (floppym) @ 2014-01-07 1:59 UTC (permalink / raw
To: gentoo-commits
floppym 14/01/07 01:59:10
Modified: subversion.eclass
Log:
Add dev-vcs/subversion[http] to the || dep in DEPEND. Patch by Arfrever.
Revision Changes Path
1.87 eclass/subversion.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.87&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?rev=1.87&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/subversion.eclass?r1=1.86&r2=1.87
Index: subversion.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- subversion.eclass 17 Oct 2013 22:53:59 -0000 1.86
+++ subversion.eclass 7 Jan 2014 01:59:10 -0000 1.87
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.86 2013/10/17 22:53:59 ottxor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.87 2014/01/07 01:59:10 floppym Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -23,7 +23,7 @@
;;
*)
EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
- DEPEND="|| ( dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
+ DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
;;
esac
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2014-01-07 1:59 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20 22:28 [gentoo-commits] gentoo-x86 commit in eclass: subversion.eclass Bo Oersted Andresen (zlin)
-- strict thread matches above, loose matches on Subject: below --
2014-01-07 1:59 Mike Gilbert (floppym)
2012-02-14 16:08 Mike Frysinger (vapier)
2010-12-19 14:51 Justin Lecher (jlec)
2010-06-22 18:34 Arfrever Frehtes Taifersar Arahesis (arfrever)
2009-05-10 20:33 Arfrever Frehtes Taifersar Arahesis (arfrever)
2009-04-29 22:47 Tomas Chvatal (scarabeus)
2009-04-29 22:26 Tomas Chvatal (scarabeus)
2009-04-26 2:33 Arfrever Frehtes Taifersar Arahesis (arfrever)
2009-04-26 2:18 Arfrever Frehtes Taifersar Arahesis (arfrever)
2009-04-26 1:57 Arfrever Frehtes Taifersar Arahesis (arfrever)
2009-03-22 1:56 Arfrever Frehtes Taifersar Arahesis (arfrever)
2008-05-27 9:49 Bo Oersted Andresen (zlin)
2008-05-15 13:27 Bo Oersted Andresen (zlin)
2008-04-30 18:57 Benedikt Boehm (hollow)
2008-03-06 9:23 Bo Oersted Andresen (zlin)
2008-02-27 12:54 Bo Oersted Andresen (zlin)
2008-02-21 16:33 Bo Oersted Andresen (zlin)
2008-02-21 16:01 Bo Oersted Andresen (zlin)
2008-02-21 13:38 Bo Oersted Andresen (zlin)
2008-02-20 22:35 Bo Oersted Andresen (zlin)
2008-02-20 20:36 Bo Oersted Andresen (zlin)
2008-02-20 20:32 Bo Oersted Andresen (zlin)
2008-02-20 19:18 Doug Klima (cardoe)
2008-02-20 17:55 Doug Klima (cardoe)
2008-02-20 17:11 Bo Oersted Andresen (zlin)
2008-02-17 7:59 Akinori Hattori (hattya)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox