Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433858 - subversion.eclass: doesn't fetch with command emerge -f
Summary: subversion.eclass: doesn't fetch with command emerge -f
Status: RESOLVED DUPLICATE of bug 249086
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Akinori Hattori
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-04 03:23 UTC by Yixun Lan
Modified: 2012-09-04 05:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
 	0|1)
-		EXPORT_FUNCTIONS src_unpack pkg_preinst
+		EXPORT_FUNCTIONS src_fetch src_unpack pkg_preinst
 		DEPEND="dev-vcs/subversion"
 		;;
 	*)
-		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] )"
 		;;
 esac
@@ -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}."
 	fi
-
-	popd >/dev/null
-	echo
 }
 
 # @FUNCTION: subversion_bootstrap
@@ -419,13 +421,17 @@
 # @FUNCTION: subversion_src_unpack
 # @DESCRIPTION:
 # 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."
 	fi
 }
 
+subversion_src_unpack() {
+	subversion_unpack || die "fsck me"
+}
+
 # @FUNCTION: subversion_src_prepare
 # @DESCRIPTION:
 # 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 ***