Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 433858

Summary: subversion.eclass: doesn't fetch with command emerge -f
Product: Gentoo Linux Reporter: Yixun Lan <dlan>
Component: EclassesAssignee: Akinori Hattori <hattya>
Severity: normal CC: mrueg, zerochaos
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Yixun Lan archtester gentoo-dev 2012-09-04 03:23:27 UTC
In subversion eclass, there is not SRC_URI variable, so emerge -f/-F don't works, it won't fetch the source code from subversion server ,the real fetch process is in *src_unpack* stage.

the scenario of problem:
0) for single live subversion ebuild, emerge -f/-F =${CATEGORY}/${PN}-9999 don't fetch the source code
1) If I install the foo-9999 package which use subversion.eclass (it will be include into /var/lib/portage/world), then the source code won't be updated during "emerge -f/F @world".
2) If I have plenty of live ebuild which base on subversion.eclass, I can't do parallel fetch. Say It won't fetch the source code while another is compiling, it will just wait, this is kind of making the fetch process serial
3) If I have serveral live ebuilds, say 10 live subversion ebuild, I can't update all the source code in one run without upacking, similiar "emerge -f/-F @package_set"

Reproducible: Always
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-04 03:34:26 UTC
I asked dlan to open this bug as this problem has always really bothered me. The fetching could easily be done in src_fetch and the rsync could happen in src_unpack.  Is there any specific reason why this is not done? I can easily enough provide patches for review.
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-04 04:27:22 UTC
Ten seconds worth of proof of concept:

Index: subversion.eclass
RCS file: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v
retrieving revision 1.83
diff -u -r1.83 subversion.eclass
--- subversion.eclass	29 Jul 2012 05:54:17 -0000	1.83
+++ subversion.eclass	4 Sep 2012 04:21:08 -0000
@@ -18,11 +18,11 @@
 case "${EAPI:-0}" in
-		EXPORT_FUNCTIONS src_unpack pkg_preinst
+		EXPORT_FUNCTIONS src_fetch src_unpack pkg_preinst
-		EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
+		EXPORT_FUNCTIONS src_fetch src_unpack src_prepare pkg_preinst
 		DEPEND="|| ( dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
@@ -333,6 +333,11 @@
 	einfo "   working copy: ${wc_path}"
+	popd >/dev/null
+	echo
+subversion_unpack() {
 	if ! has "export" ${ESVN_RESTRICT}; then
 		cd "${wc_path}" || die "${ESVN}: can't chdir to ${wc_path}"
@@ -344,9 +349,6 @@
 		#* svn export . "${S}" || die "${ESVN}: can't export to ${S}."
 		rsync -rlpgo --exclude=".svn/" . "${S}" || die "${ESVN}: can't export to ${S}."
-	popd >/dev/null
-	echo
 # @FUNCTION: subversion_bootstrap
@@ -419,13 +421,17 @@
 # @FUNCTION: subversion_src_unpack
 # Default src_unpack. Fetch and, in older EAPIs, bootstrap.
-subversion_src_unpack() {
+subversion_src_fetch() {
 	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."
+subversion_src_unpack() {
+	subversion_unpack || die "fsck me"
 # @FUNCTION: subversion_src_prepare
 # Default src_prepare. Bootstrap.
Comment 3 Ulrich Müller gentoo-dev 2012-09-04 05:16:14 UTC
A src_fetch phase function doesn't exist...

*** This bug has been marked as a duplicate of bug 249086 ***