summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2012-06-10 11:31:12 +0000
committerAkinori Hattori <hattya@gentoo.org>2012-06-10 11:31:12 +0000
commitc1c506f936fdaaee8a4425c05b1eafd2e7ebf28c (patch)
tree5bac32cb28e1e965e5d015b365a71ac9b0a9969f /eclass
parentupdate to EAPI4 (diff)
downloadgentoo-2-c1c506f936fdaaee8a4425c05b1eafd2e7ebf28c.tar.gz
gentoo-2-c1c506f936fdaaee8a4425c05b1eafd2e7ebf28c.tar.bz2
gentoo-2-c1c506f936fdaaee8a4425c05b1eafd2e7ebf28c.zip
reorder public functions
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/subversion.eclass82
2 files changed, 45 insertions, 42 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index b5a65dc341d9..2e75daaee6b3 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.302 2012/06/10 11:05:46 hattya Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.303 2012/06/10 11:31:12 hattya Exp $
+
+ 10 Jun 2012; Akinori Hattori <hattya@gentoo.org> subversion.eclass:
+ reorder public functions
10 Jun 2012; Akinori Hattori <hattya@gentoo.org> subversion.eclass:
fixes bug #416743.
diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index 33dd96ac5b31..2f8ea6a6363e 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -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.78 2012/06/10 11:05:46 hattya Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.79 2012/06/10 11:31:12 hattya Exp $
# @ECLASS: subversion.eclass
# @MAINTAINER:
@@ -406,23 +406,6 @@ subversion_bootstrap() {
fi
}
-# @FUNCTION: subversion_src_unpack
-# @DESCRIPTION:
-# 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}" 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."
-}
-
# @FUNCTION: subversion_wc_info
# @USAGE: [repo_uri]
# @RETURN: ESVN_WC_URL, ESVN_WC_ROOT, ESVN_WC_UUID, ESVN_WC_REVISION and ESVN_WC_PATH
@@ -449,6 +432,46 @@ subversion_wc_info() {
export ESVN_WC_PATH="${wc_path}"
}
+# @FUNCTION: subversion_src_unpack
+# @DESCRIPTION:
+# 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}" 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."
+}
+
+# @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 "${1}"
+ 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"
+ 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
+}
+
## -- Private Functions
## -- subversion__svn_info() ------------------------------------------------- #
@@ -513,26 +536,3 @@ subversion__get_peg_revision() {
echo "${peg_rev}"
}
-
-# @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 "${1}"
- 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"
- 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
-}