Rationale
Some projects(like Poedit) includes many submodules that aren’t needed in building on GNU+Linux platform, we should have a way to exclude fetching them in the snapcraft.yaml.
Problems to Solve
- Make git submodules optional? snapcraft May '17 - I’ve a case where only some of my parts require git submodules to be checked out. The other parts just waste time and space on them. my-part: source: . source-type: git Think it makes sense to make…
- Anyway to avoid updating ALL Git submodules? snapcraft Sep '17 - I’m currently trying to snap Poedit, it includes may dependencies as Git submodules that is rarely used in GNU+Linux build(mostly for Mac OS/Windows). Is it possible to only update selected submodu…
Proposal
This proposal requests a new source-submodules
option which accepts a list of submodule paths for snapcraft to run git submodule init
to initialize with, when this key existed the default behavior of initializing and updating all active submodules in .gitmodules shall be overrided.
Example Config
parts:
poedit:
plugin: autotools
install-via: prefix
source: https://github.com/vslavik/poedit.git
source-submodules:
- deps/wx
- deps/json