-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomáš Chvátal wrote:
> I am throwing in full new eclass [1] and its diff [2].

Errr, maybe it's my eyes, but it looks as though the new eclass isn't
the same as the existing eclass with the diff applied (for instance,
git_src_prepare doesn't get called in the diff, but does in the new eclass).

Also, base_src_prepare doesn't get exported if EAPI != 2, so I'm not
sure what happens when it gets called from git_src_prepare (which can be
called when EAPI = 0|1).  Has anyone actually tried this on a non-EAPI2
ebuild?

Lastly (and this happened in the old eclass, but I figured since it was
getting an update now would be a good time to fix it), because checking
out uses "--depth 1", it's possible for a checkout to fail (specifically
if EGIT_BRANCH/EGIT_TREE is set on first checkout) since the required
commitish may not exist in the shallow copy.  The error messages thrown
out are along the lines of "not a tar file", but I believe the ebuild
continues, until it doesn't find the unpacked source.  The possible
fixes would be to:

a) ask git to clone at a specific commitish (although I can see how to
do that in git clone --help)

b) see if there's a specific commit set, and then clone the whole tree

c) see if there's a specific commit set, and if so trap the error
message and offer a useful warning like "remove the repo and set
EGIT_FETCH_CMD='git clone --bare'"

Unfortunately a) and b) don't solve the problem of a specific commit
being set by a user after the initial clone's taken place (in which
case, if it's not in the clone there'll never be a way to get it from
that checked out copy).

Perhaps on an error during an update could clear out the git repository
from distfiles/git-src and try again without a --depth?  Clones made
without a --depth entry that then fail would be an actual fail...

Mike  5:)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEARECAAYFAkmuZk4ACgkQu7rWomwgFXoZ9wCbBh2BH7ERu+Ck/0W0IkLxHPU4
GW4An1DMBJ2rK+Hkb92U571QegW+VDhQ
=aB2B
-----END PGP SIGNATURE-----

Reply via email to