Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Michał Górny <mgorny@g.o>
Subject: RFC: git-2.eclass & fetching from multiple repos
Date: Thu, 17 May 2012 10:40:33 +0200
Hello,

Sometimes it is necessary for a single package to pull from multiple
remote repositories. One case are broken packages like glibc (where
two repositories have to be merged for build-time), another are git
submodules (which don't cooperate well with bare checkouts).

Thus, I'm wondering about adding support for such a feature to
git-2.eclass. However, I don't have any concept for it yet so I'd
appreciate your ideas. What needs to be thought up is not only how to
do it but also what to do, exactly.

The simpler case would be only to provide support for fetching from
multiple repositories in git-2, and use it for submodules internally.
This would already fix glibc-9999 & smart-live-rebuild cooperation but
the glibc ebuild would still need to do a little hackery to checkout
the second repository.

The more complete case would be to completely support multiple
repostories but it would require a larger eclass rewrite, to support
hacking more of its variables.

Another question is how to implement it API-wide. The main problem here
is that we already use multiple values for EGIT_REPO_URI to support
fallback URIs, and I'd prefer supporting that for the additional repos
as well.


1/ Mike suggested something like:

EGIT_REPO_URI=( "repo1 fallback1" "repo2 fallback2" )

but IMO it hurts readability and makes the behavior a little surprising
(not that the fallback syntax isn't surprising already).


2/ Exherbo way would be doing something like:

EGIT_SECONDARY_REPOS='foo'
EGIT_foo_REPO_URI=...

but that would be real PITA for smart-live-rebuild, and I really hate
dynamically named variables.


3/ I'm wondering about something in-between those two, supposedly:

EGIT_SECONDARY_REPO_URIS=( "repo2 fallback2" ... )

Still painful for s-l-r but could be implemented without
eclass-specific hacks as array support. Of course, if we support this
not only for fetching but for checkouts as well, it's likely to get
unreadable as well...

What are your ideas?

-- 
Best regards,
Michał Górny
Attachment:
signature.asc (PGP signature)
Replies:
Re: RFC: git-2.eclass & fetching from multiple repos
-- Steven J Long
Re: RFC: git-2.eclass & fetching from multiple repos
-- Luca Barbato
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
last rites: games-arcade/ssc
Next by thread:
Re: RFC: git-2.eclass & fetching from multiple repos
Previous by date:
Re: Stability of /sys api
Next by date:
forcing recent patch-2.6.1 everywhere


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.