nitro322 Guru
Joined: 24 Jul 2002 Posts: 594 Location: USA
|
Posted: Wed Sep 21, 2011 2:28 pm Post subject: Ebuild for package with multiple source repos |
|
|
I'm trying to write a new ebuild for mupen64plus, which has undergone some major architectural changes since the last stable release. The project is now split into multiple separate mercurial repositories, and there doesn't seem to be any 'master' repo from which to pull/clone/checkout all parts at once. I was thinking I could specify multiple repositories in EHG_REPO_URI and portage would do the right thing with each of them (like it does with SRC_URI), but that doesn't seem to be the case; mercurial_src_unpack simply treats the full string as a single URL.
I figure I can write multiple ebuilds, one per package repo, but that'd be pretty ugly and lead to more maintenance down the road. I could simply call 'hg clone' directly within the src_unpack function to pull from each repo, but then that'd get written to $WORKDIR and I'd lose the clone after the emerge completes; I'd rather portage handle it normally so it gets cached under distfiles and just updated in future rebuilds. I could also do something like the guy suggests in this post, involving looping through multiple REPO_URIs and calling mercurial_src_unpack for each, but I can't quite figure out what he's doing in his example, and when I try to replicate it myself I keep getting errors about $WORKDIR not being empty on subsequent calls.
So, I'm kind of stuck now. How should something like this be done? Anyone have to do something like this before? or have an easy/elegant solution in mind? _________________ https://www.legroom.net/ |
|