Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479696 - git-2.eclass - add support for multiple repositories
Summary: git-2.eclass - add support for multiple repositories
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-04 07:37 UTC by Yixun Lan
Modified: 2016-08-06 08:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
git-2.eclass test ebuild (myfoobar-9999.ebuild,388 bytes, text/plain)
2013-08-04 07:41 UTC, Yixun Lan
Details
eclass debug log (eclass-debug.log,1.38 KB, text/x-log)
2013-08-04 07:44 UTC, Yixun Lan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yixun Lan archtester gentoo-dev 2013-08-04 07:37:47 UTC
there are few cases where one ebuild may require several git repositories.
although you can put multi repo in EGIT_REPO_URI, but it seems doesn't work.



Reproducible: Always

Actual Results:  
set EGIT_REPO_URI="git://myfoobar.org/foo.git git://myfoobar.org/bar.git"

if will download one repo (the first) - git://myfoobar.org/foo.git and put into ${DISTDIR}/egit-src/bar.git. only one repository was cloned/fetched.


current acutal log:
 # ebuild myfoobar-9999.ebuild unpack
>>> Unpacking source...
Cloning into bare repository '/mnt/proj/gentoo/locals/egit-src/bar.git'...
remote: warning: unable to access '/root/.config/git/attributes': Permission den
ied
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
Checking connectivity... done
GIT NEW clone -->
   repository:               git://myfoobar.org/foo.git
   at the commit:            0b47bc03757bba9455815728aac17e3e318bd77c
   branch:                   master
   storage directory:        "/mnt/proj/gentoo/locals/egit-src/bar.git"
   checkout type:            bare repository
Cloning into '/var/tmp/portage/app-emulation/myfoobar-9999/work/myfoobar-9999'..
.
done.
Checking connectivity... done
Branch branch-master set up to track remote branch master from origin.
Switched to a new branch 'branch-master'
>>> Unpacked to /var/tmp/portage/app-emulation/myfoobar-9999/work/myfoobar-9999
>>> Source unpacked in /var/tmp/portage/app-emulation/myfoobar-9999/work

Expected Results:  
set EGIT_REPO_URI="git://myfoobar.org/foo.git git://myfoobar.org/bar.git"

and it will download source code from both git://myfoobar.org/{foo,bar}.git, put them to ${DISTDIR}/egit-src/{foo,bar}.git
and finally will sync source to ${WORKDIR}/{foo,bar}
it would be better if we can control the EGIT_BRANCH, EGIT_COMMIT, EGIT_SOURCEDIR
Comment 1 Yixun Lan archtester gentoo-dev 2013-08-04 07:41:01 UTC
Created attachment 355088 [details]
git-2.eclass test ebuild
Comment 2 Yixun Lan archtester gentoo-dev 2013-08-04 07:44:30 UTC
Created attachment 355090 [details]
eclass debug log
Comment 3 Yixun Lan archtester gentoo-dev 2013-08-04 08:32:58 UTC
after talking to @mgorny, this can be achieved to call git-2_src_unpack() multi times to fetch several repos.

src_unpack() {
EGIT_REPO_URI="git://myfoobar.org/foo.git" EGIT_SOURCEDIR="${S}/foo" git-2_src_unpack

EGIT_REPO_URI="git://myfoobar.org/bar.git" EGIT_SOURCEDIR="${S}/bar" git-2_src_unpack
}

thanks
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-08-04 20:50:08 UTC
In my opinion this is not something we should do. The effort and potential confusion would be greater than the benefit, and AFAIK no other VCS eclass supports multi-repo natively.

If there's something that causes trouble when doing multiple eclass function calls, please let us know and we'll fix it. But currently this seems like the proper thing to do -- or at least most proper, considering that using multiple repositories like that is broken by design.
Comment 5 Pacho Ramos gentoo-dev 2016-08-06 08:28:15 UTC
Use git-r3.eclass instead