Gentoo Archives: gentoo-dev

From: Mike Auty <ikelos@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Git eclass update
Date: Wed, 04 Mar 2009 11:30:28
Message-Id: 49AE664F.10905@gentoo.org
In Reply to: [gentoo-dev] Git eclass update by "Tomáš Chvátal"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Tomáš Chvátal wrote:
5 > I am throwing in full new eclass [1] and its diff [2].
6
7 Errr, maybe it's my eyes, but it looks as though the new eclass isn't
8 the same as the existing eclass with the diff applied (for instance,
9 git_src_prepare doesn't get called in the diff, but does in the new eclass).
10
11 Also, base_src_prepare doesn't get exported if EAPI != 2, so I'm not
12 sure what happens when it gets called from git_src_prepare (which can be
13 called when EAPI = 0|1). Has anyone actually tried this on a non-EAPI2
14 ebuild?
15
16 Lastly (and this happened in the old eclass, but I figured since it was
17 getting an update now would be a good time to fix it), because checking
18 out uses "--depth 1", it's possible for a checkout to fail (specifically
19 if EGIT_BRANCH/EGIT_TREE is set on first checkout) since the required
20 commitish may not exist in the shallow copy. The error messages thrown
21 out are along the lines of "not a tar file", but I believe the ebuild
22 continues, until it doesn't find the unpacked source. The possible
23 fixes would be to:
24
25 a) ask git to clone at a specific commitish (although I can see how to
26 do that in git clone --help)
27
28 b) see if there's a specific commit set, and then clone the whole tree
29
30 c) see if there's a specific commit set, and if so trap the error
31 message and offer a useful warning like "remove the repo and set
32 EGIT_FETCH_CMD='git clone --bare'"
33
34 Unfortunately a) and b) don't solve the problem of a specific commit
35 being set by a user after the initial clone's taken place (in which
36 case, if it's not in the clone there'll never be a way to get it from
37 that checked out copy).
38
39 Perhaps on an error during an update could clear out the git repository
40 from distfiles/git-src and try again without a --depth? Clones made
41 without a --depth entry that then fail would be an actual fail...
42
43 Mike 5:)
44 -----BEGIN PGP SIGNATURE-----
45 Version: GnuPG v2.0.10 (GNU/Linux)
46
47 iEYEARECAAYFAkmuZk4ACgkQu7rWomwgFXoZ9wCbBh2BH7ERu+Ck/0W0IkLxHPU4
48 GW4An1DMBJ2rK+Hkb92U571QegW+VDhQ
49 =aB2B
50 -----END PGP SIGNATURE-----