1 |
On Tue, 27 Nov 2012 12:18:51 -0800 |
2 |
Davide Pesavento <pesa@g.o> wrote: |
3 |
|
4 |
> On Tue, Nov 27, 2012 at 11:22 AM, Sergei Trofimovich <slyfox@g.o> wrote: |
5 |
> > Before the patch I had to move subdir(not very reliable): |
6 |
> > EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git" |
7 |
> > src_prepare() { |
8 |
> > mv EHC/* ./ || die |
9 |
> > } |
10 |
> > |
11 |
> > After the patch i can define it the usual way: |
12 |
> > EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git" |
13 |
> > S="${WORKDIR}/${P}/EHC |
14 |
> > |
15 |
> > Original ebuild: https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-9999.ebuild#L27 |
16 |
> > |
17 |
> > Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
18 |
> > --- |
19 |
> > git-2.eclass | 4 ++-- |
20 |
> > 1 file changed, 2 insertions(+), 2 deletions(-) |
21 |
> > |
22 |
> > diff --git a/git-2.eclass b/git-2.eclass |
23 |
> > index 1ecc633..1a96978 100644 |
24 |
> > --- a/git-2.eclass |
25 |
> > +++ b/git-2.eclass |
26 |
> > @@ -21,7 +21,7 @@ DEPEND="dev-vcs/git" |
27 |
> > # This variable specifies destination where the cloned |
28 |
> > # data are copied to. |
29 |
> > # |
30 |
> > -# EGIT_SOURCEDIR="${S}" |
31 |
> > +# EGIT_SOURCEDIR="${WORKDIR}/${P}" |
32 |
> > |
33 |
> > # @ECLASS-VARIABLE: EGIT_STORE_DIR |
34 |
> > # @DESCRIPTION: |
35 |
> > @@ -132,7 +132,7 @@ git-2_init_variables() { |
36 |
> > local esc_pn liverepo livebranch livecommit |
37 |
> > esc_pn=${PN//[-+]/_} |
38 |
> > |
39 |
> > - : ${EGIT_SOURCEDIR="${S}"} |
40 |
> > + : ${EGIT_SOURCEDIR="${WORKDIR}/${P}"} |
41 |
> > |
42 |
> > : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"} |
43 |
> > |
44 |
> > -- |
45 |
> > 1.8.0 |
46 |
> > |
47 |
> > |
48 |
> |
49 |
> While in theory this makes sense, it also has the potential to break |
50 |
> ebuilds setting S="${WORKDIR}/foo" and then expecting the sources to |
51 |
> be inside "foo". IOW it's not backward compatible, is it? |
52 |
|
53 |
Right, it's not. I thought that default makes no sense as it relocates |
54 |
git repo, but not the tarballs (if yet in SRC_URI). It does make sense |
55 |
for submodules though, but you need to override EGIT_SOURCEDIR |
56 |
for them anyway. |
57 |
|
58 |
EGIT_SOURCEDIR users in tree are quite fun: [attached] |
59 |
|
60 |
All try to set it to ${WORKDIR}/${P} in one form or another. |
61 |
|
62 |
I didn't check actual users before. Seems there is a possibility of breakage. |
63 |
|
64 |
Please ignore both patches. We'll keep local modifications in haskell overlay. |
65 |
|
66 |
Sorry for the noise. |
67 |
|
68 |
-- |
69 |
|
70 |
Sergei |