Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] RFC: git-2.eclass & fetching from multiple repos
Date: Thu, 17 May 2012 08:40:57
Message-Id: 20120517104033.69067845@pomiocik.lan
1 Hello,
2
3 Sometimes it is necessary for a single package to pull from multiple
4 remote repositories. One case are broken packages like glibc (where
5 two repositories have to be merged for build-time), another are git
6 submodules (which don't cooperate well with bare checkouts).
7
8 Thus, I'm wondering about adding support for such a feature to
9 git-2.eclass. However, I don't have any concept for it yet so I'd
10 appreciate your ideas. What needs to be thought up is not only how to
11 do it but also what to do, exactly.
12
13 The simpler case would be only to provide support for fetching from
14 multiple repositories in git-2, and use it for submodules internally.
15 This would already fix glibc-9999 & smart-live-rebuild cooperation but
16 the glibc ebuild would still need to do a little hackery to checkout
17 the second repository.
18
19 The more complete case would be to completely support multiple
20 repostories but it would require a larger eclass rewrite, to support
21 hacking more of its variables.
22
23 Another question is how to implement it API-wide. The main problem here
24 is that we already use multiple values for EGIT_REPO_URI to support
25 fallback URIs, and I'd prefer supporting that for the additional repos
26 as well.
27
28
29 1/ Mike suggested something like:
30
31 EGIT_REPO_URI=( "repo1 fallback1" "repo2 fallback2" )
32
33 but IMO it hurts readability and makes the behavior a little surprising
34 (not that the fallback syntax isn't surprising already).
35
36
37 2/ Exherbo way would be doing something like:
38
39 EGIT_SECONDARY_REPOS='foo'
40 EGIT_foo_REPO_URI=...
41
42 but that would be real PITA for smart-live-rebuild, and I really hate
43 dynamically named variables.
44
45
46 3/ I'm wondering about something in-between those two, supposedly:
47
48 EGIT_SECONDARY_REPO_URIS=( "repo2 fallback2" ... )
49
50 Still painful for s-l-r but could be implemented without
51 eclass-specific hacks as array support. Of course, if we support this
52 not only for fetching but for checkouts as well, it's likely to get
53 unreadable as well...
54
55 What are your ideas?
56
57 --
58 Best regards,
59 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] RFC: git-2.eclass & fetching from multiple repos Luca Barbato <lu_zero@g.o>
[gentoo-dev] Re: RFC: git-2.eclass & fetching from multiple repos Steven J Long <slong@××××××××××××××××××.uk>