Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 497164

Summary: git-r3.eclass does not allow to disable submodules
Product: Gentoo Linux Reporter: Nikoli <nikoli>
Component: EclassesAssignee: Michał Górny <mgorny>
Status: RESOLVED FIXED    
Severity: normal CC: public, rafaelmartins, reagentoo, rei4dan, robbat2, rossi.f
Priority: Normal Keywords: NeedPatch
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: EGIT_SUBMODULES support patch

Description Nikoli 2014-01-05 19:35:09 UTC
Eclass should provide some way to disable all or some submodules.

Tried migrating aegisub-9999.ebuild to git-r3, but reverted to git-2: only system libs are used, so none of submodules is used, but git-r3 forces to download all 13 (sic!) submodules.

$ git clone https://github.com/Aegisub/Aegisub.git test
$ $ grep url test/.gitmodules 
        url = git://anongit.freedesktop.org/fribidi/fribidi
        url = git://git.sv.nongnu.org/freetype/freetype2.git
        url = git://github.com/madler/zlib.git
        url = git://github.com/wxWidgets/wxWidgets.git
        url = git://github.com/svn2github/googletest.git
        url = git://source.ffmpeg.org/ffmpeg.git
        url = git://github.com/FFMS/ffms2.git
        url = git://github.com/tgoyne/fontconfig.git
        url = https://code.google.com/p/libass/
        url = git://github.com/sillsdev/icu4c.git
        url = https://github.com/boostorg/boost.git
        url = git://github.com/ittner/Lua-experimentation.git
        url = https://github.com/Aegisub/fftw3.git
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-07 04:47:17 UTC
I'm for adding something like a list of allowed EGIT_SUBMODULES.

Much like:

- EGIT_SUBMODULES not declared -- download all,

- EGIT_SUBMODULES=() -- disable completely,

- EGIT_SUBMODUELS=( /foo /bar ) -- only /foo and /bar.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-03-25 23:58:09 UTC
mgorny:
I have a usage case for this as well, a repo that has a lot of testing data in submodules, so I'd like to wrap it behind USE=test.

I think it should probably be a blacklist of submodules to NOT check out.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-03-26 07:51:45 UTC
I guess blacklist with wildcards would work as well.
Comment 4 Hadrien Lacour 2016-05-23 13:04:16 UTC
Any idea of when it's gonna be fixed? Pretty needed for a ppsspp patch I'm thinking of doing.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-23 14:29:07 UTC
The most correct answer is: when someone writes a patch for it. I don't know when I'll have time for it.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-23 18:44:33 UTC
Ok, I'm going to have a patch for this this evening.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-23 19:53:39 UTC
Created attachment 435130 [details, diff]
EGIT_SUBMODULES support patch

Please test the attached patch.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-26 08:59:38 UTC
commit 1c8f9f89ccac3382df4a0bfdddb6918b24489f69
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Mon May 23 21:51:57 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Thu May 26 10:58:08 2016

    git-r3.eclass: Support EGIT_SUBMODULES to filter used submodules, #497164

Also:

commit f3090936d98f1565ca10bc9eb78680b1e33a6536
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Thu May 26 10:34:28 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Thu May 26 10:58:08 2016

    media-video/aegisub: Switch to git-r3
    
    Switch the live ebuild to git-r3, using the new EGIT_SUBMODULES API.
Comment 9 Coacher 2016-05-26 13:14:59 UTC
(In reply to Michał Górny from comment #8)
Thank you very much for your work on this problem and additional thanks for updating aegisub-9999.