From: Doug Klima <cardoe@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] subversion.eclass
Date: Tue, 19 Feb 2008 15:06:13 -0500 [thread overview]
Message-ID: <47BB36B5.9020809@gentoo.org> (raw)
In-Reply-To: <200802152339.53007.zlin@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]
Bo Ørsted Andresen wrote:
> For quite a while the KDE herd has had a modified version of subversion.eclass
> in the kde overlay. During that time we have added the following features to
> the eclass which we would like to put back in gentoo-x86 soon. Since the
> changes are fairly extensive we decided to send it to this list for review
> first.
>
> 1) ESVN_REVISION (before this people had to use ESVN_OPTIONS for this
> purpose).
> 2) ESVN_OFFLINE which disables svn up.
> 3) ESVN_UP_FREQ which uses GNU find to determine if the specified number of
> hours has passed and only do svn up if it has. This is currently used in the
> kde4svn-meta eclass for split kde ebuilds that use the same checkout of each
> module.
> 4) ESCM_LOGDIR for logging which revisions packages get installed with. See
> [1]. Users need to explicitly enable this feature to use it.
>
> Other than this the eclass has been documented for use with eclass-manpages.
>
> [1] http://thread.gmane.org/gmane.linux.gentoo.devel/54233
>
>
ok. Well zlin and I have been talking lately and we've hammered out his
proposed changes and mine. I'm attaching a patch for the first set of
changes I have proposed.
Attached is a patch for the following:
- use $ECLASS
- adding rsync to deps
- fixing some quoting
- remove multiple subshell calls and problematic to upper usage (bug #s
escape me right now)
- provide some more information about the working copy that will be used
in the future.
- supporting svn switch
The most important being the svn switch functionality.
Please review for commit.
[-- Attachment #2: subversion-cleanups-01.patch --]
[-- Type: text/x-patch, Size: 2699 bytes --]
--- /usr/portage/eclass/subversion.eclass 2008-02-17 03:06:00.000000000 -0500
+++ subversion.eclass 2008-02-18 17:11:52.000000000 -0500
@@ -17,17 +17,16 @@
inherit eutils
-ESVN="subversion.eclass"
+ESVN=$ECLASS
EXPORT_FUNCTIONS src_unpack
DESCRIPTION="Based on the ${ECLASS} eclass"
-
## -- add subversion in DEPEND
#
-DEPEND="dev-util/subversion"
-
+DEPEND="dev-util/subversion
+ net-misc/rsync"
## -- ESVN_STORE_DIR: subversion sources store directory
#
@@ -42,6 +41,10 @@
#
ESVN_UPDATE_CMD="svn update"
+## -- ESVN_SWITCH_CMD: subversion switch command
+#
+ESVN_SWITCH_CMD="svn switch"
+
## -- ESVN_OPTIONS:
#
@@ -143,7 +146,7 @@
svn|svn+ssh)
;;
*)
- die "${ESVN}: fetch from "${protocol}" is not yet implemented."
+ die "${ESVN}: fetch from \"${protocol}\" is not yet implemented."
;;
esac
@@ -180,17 +183,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}" 1)" ]; then
- die "${ESVN}: ESVN_REPO_URI (or specified URI) and working copy's URL are not matched."
- fi
+ einfo "subversion switch start -->"
+ einfo " old repository: ${ESVN_WC_URL}"
+ einfo " new repository: ${repo_uri}"
- # update working copy
- einfo "subversion update start -->"
- einfo " repository: ${repo_uri}"
+ debug-print "${FUNCNAME}: ${ESVN_SWITCH_CMD} ${options}"
- 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 switch to ${repo_uri}."
+ else
+ # update working copy
+ einfo "subversion update start -->"
+ einfo " repository: ${repo_uri}"
- 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
@@ -299,12 +309,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}"
}
next prev parent reply other threads:[~2008-02-19 20:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 22:39 [gentoo-dev] subversion.eclass Bo Ørsted Andresen
2008-02-15 23:07 ` Donnie Berkholz
2008-02-16 0:05 ` Bernd Steinhauser
2008-02-15 23:40 ` Doug Klima
2008-02-16 0:11 ` Bernd Steinhauser
2008-02-16 0:28 ` Doug Klima
2008-02-16 0:11 ` Bo Ørsted Andresen
2008-02-19 20:06 ` Doug Klima [this message]
2008-02-19 21:37 ` Doug Klima
2008-02-20 16:10 ` Doug Klima
2008-02-20 16:20 ` Doug Klima
2008-02-20 16:39 ` Doug Klima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47BB36B5.9020809@gentoo.org \
--to=cardoe@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox