Bug 362687 - Enable kdesrc-build to handle Git Submodules
Summary: Enable kdesrc-build to handle Git Submodules
Status: RESOLVED MOVED
Alias: None
Product: kdesrc-build
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
: 418259 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-05 06:51 UTC by Andreas Cord-Landwehr
Modified: 2024-03-03 17:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Cord-Landwehr 2016-05-05 06:51:11 UTC
Currently, kdesrc-build does not respect when Git repositories have submodules and one has to checkout all of them by hand and update them by hand. I see two possible ways how to provide this feature:
1) by default handle every repository as it had submodules: "git clone --recursive" should not be disruptive as well as "git submodule update --recursive" should not harm a repository with submodules IMHO
2) provide an option for the Git call of a module to specifically enable submodule handling.

Reproducible: Always
Comment 1 Michael Pyne 2016-06-04 21:41:36 UTC
Is this for Qt5? Reason I ask is that I can imagine good reasons why someone would not want to have git automatically pull down every possible Qt5 submodule just because someone was innocently meaning to get qtbase.

So assuming we go with making it an option, the way I would probably implement this would be to refactor the existing Updater::Git module (in modules/ksb/Updater/Git.pm) to allow for customization of clones and updates, make a subclass of Updater::Git that uses the customization to actually conduct a submodule-aware clone/update/etc., and then have an option for the module that causes kdesrc-build to create the new subclass instead of Updater::Git when creating the scmType for the module (probably in ModuleSet.pm's _initializeNewModule).

This does leave open the difficulty that this would only work with non-"KDE Project" modules (which are already a separate subclass) but this seems fine given our current git repository structure, unless you know of other places where submodules are used for KDE repos.
Comment 2 Andreas Cord-Landwehr 2017-01-02 09:19:40 UTC
Sorry for the late answer, completely forgot about this :/
Qt5 would be an example where I could imagine to use it. With Qt's own configuration system however, I am not sure how easy it will be to build it with kdesrc-build. My specific use case is that I would like to add QtCreator to kdesrc-build, which uses submodules. Within KDE I cannot recall any use of submodules except the kf5-books project (which is a very special corner-case that we do not have to add to kdesrc-build :)
Deactivating it by default seems completely fine for me.
Comment 3 Andrew Shark 2023-09-01 11:30:05 UTC
*** Bug 418259 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Shark 2024-03-03 17:06:28 UTC
Duplicates https://invent.kde.org/sdk/kde-builder/-/issues/40