E.g. I have submodules in project tree location `contrib/` I want all of them to be fetched but some of them also have sub-submodules e.g. `contrib/foo/bar` Reproducible: Always Steps to Reproduce: 1. Choose a project with sub-submodules 2. Enable all submolules in ebuild via submodules_dir/* glob 3. Try different ways to disable sub-submodules like submodules-dir/*/* Actual Results: All sub-submodules get fetched Expected Results: Only submodules, but not sub-submodules are fetched
Would it be possible for you to point me to that project, or (even better) give me a test ebuild?
Sure, take a look at https://github.com/gentoo/gentoo/pull/12799 as example
Ok, I see the problem now. The submodule fetching function is unaware of submodule path. I need to fix that but I need a while to think how to do it best.
Created attachment 595962 [details, diff] 0001-git-r3.eclass-Handle-recursive-submodules-in-EGIT_SU.patch Could you test this patch, please? It seems to do the correct thing for me but since it's a bit complex, I'd like to be sure.
Ping.
Hi, sorry for the delay. Yep, patch works for me. I have a few ideas to test with more include/exclude patterns in different orders, but anyway in general that works much better than before.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23717189bcef73c1b4604282de58daaf14a17b43 commit 23717189bcef73c1b4604282de58daaf14a17b43 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-11-13 14:06:35 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2020-01-10 18:27:18 +0000 git-r3.eclass: Handle recursive submodules in EGIT_SUBMODULES Match recursive submodules using their full paths rather than path relatively to the parent submodule. Closes: https://bugs.gentoo.org/694494 Signed-off-by: Michał Górny <mgorny@gentoo.org> eclass/git-r3.eclass | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)