Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109239 - subversion.eclass patch for allowing ESVN_CO_DIR specification
Summary: subversion.eclass patch for allowing ESVN_CO_DIR specification
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Akinori Hattori
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-13 21:29 UTC by Philip Kovacs
Modified: 2006-07-22 07:02 UTC (History)
0 users

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


Attachments
subversion.eclass - original ebuild as reference for patch (subversion.eclass,6.05 KB, text/plain)
2005-10-13 21:30 UTC, Philip Kovacs
Details
subversion.eclass.diff - the patch itself (subversion.eclass.diff,1.37 KB, text/plain)
2005-10-13 21:31 UTC, Philip Kovacs
Details
subversion.eclass.diff - the patch itself (subversion.eclass.diff,1.97 KB, patch)
2005-10-13 23:07 UTC, Philip Kovacs
Details | Diff
subversion.eclass.diff - the patch itself (subversion.eclass.diff,1.18 KB, patch)
2005-10-14 15:58 UTC, Philip Kovacs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Kovacs 2005-10-13 21:29:23 UTC
Currently, ebuilds or eclasses which inherit the subversion eclass cannot refine
the location in which check-outs are stored locally.  Yes, you can manipulate
ESVN_STORE_DIR, but I am referring to refinements under that location.  

The variable ESVN_CO_DIR serves this purpose internally within the eclass, but
overriding that variable in the client ebuild or eclass does not produce the
expected result.  Instead, subversion.eclass will always drop the files into
${ESVN_STORE_DIR}/${ESVN_PROJECT}.

For example, the XFCE svn project consists of many modules. See:
http://www.xfce.org/index.php?page=documentation&lang=en

We would like to be able to specify subversion eclass variables in order to
check out a desired module, in the following manner:

ESVN_PROJECT="xfce"
ESVN_REPO_URI="http://svn.foo-projects.org/svn/${ESVN_PROJECT}/${ESVN_MODULE}/trunk"
ESVN_CO_DIR="${ESVN_PROJECT}/${ESVN_MODULE}"

where ESVN_CO_DIR is implicitly under the directory ESVN_STORE_DIR, as the
eclass is currently designed. This would allow use to organize our local
directories by project AND module, e.g. as follows:

/usr/portage/distfiles/svn-src/xfce/gtk-xfce-engine-2/...
/usr/portage/distfiles/svn-src/xfce/libxfce4mcs/...
etc.

The attached patch to subversion.eclass enables clients of the subversion.eclass
 to use ESVN_CO_DIR in the manner I described above: as a refining subdirectory
under ESVN_STORE_DIR.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Philip Kovacs 2005-10-13 21:30:27 UTC
Created attachment 70625 [details]
subversion.eclass - original ebuild as reference for patch
Comment 2 Philip Kovacs 2005-10-13 21:31:16 UTC
Created attachment 70626 [details]
subversion.eclass.diff - the patch itself
Comment 3 Philip Kovacs 2005-10-13 23:07:10 UTC
Created attachment 70641 [details, diff]
subversion.eclass.diff - the patch itself
Comment 4 Philip Kovacs 2005-10-14 11:18:44 UTC
I'm am marking my bug as invalid for now as this patch is not general-purpose
enough for general distribution and may break things.
Comment 5 Philip Kovacs 2005-10-14 15:58:21 UTC
Created attachment 70697 [details, diff]
subversion.eclass.diff - the patch itself

OK this one works the way I want it to.  Bug re-opened.  The key idea is the
the svn co command now explicitly indicates the path for installation using
ESVN_CO_DIR which defaults to ESVN_PROJECT if not indicated.  Got rid of some
of that dreadful bash substitution voodoo which is soooo difficult to debug by
inspection.
Comment 6 Philip Kovacs 2005-10-14 15:59:50 UTC
re-opened.
Comment 7 Akinori Hattori gentoo-dev 2006-07-22 07:02:56 UTC
Please use ESVN_PROJECT instead.

From your example:

ESVN_REPO_URI="http://svn.foo-projects.org/svn/${ESVN_PROJECT}/${ESVN_MODULE}/trunk"
ESVN_PROJECT="xfce/${ESVN_MODULE}"

or

ESVN_PROJECT="xfce/${ESVN_MODULE}"
ESVN_REPO_URI="http://svn.foo-projects.org/svn/${ESVN_PROJECT}/trunk"

will work for you.