← Back to issue list

fix(snapcraft): do not fetch git submodules during build (Fixes #5837)

View original Github issue

Metadata

Project
snapcraft
Number
#5840
Type
pull request
State
closed
Author
124107157-KV
Labels
Created
Updated
Closed

Current evaluation

Proposed changes to disable git submodule fetching during Snapcraft builds were closed without merging. The reviewer rejected the contribution, stating the underlying issue cannot be resolved at this time, despite successful local verification and CI passes.

Suggested action:

No scores available.

Issue body

### **Summary** This PR disables fetching or initializing Git submodules during the Snapcraft snap build process. ### **Context** As per [(https://github.com/canonical/snapcraft/issues/5837)](https://github.com/canonical/snapcraft/issues/5837), the current Snapcraft build unnecessarily downloads Git submodules that are not required for building the snap itself. This wastes time and network resources during the build process. ### **Change Details** * Set `source-type: git` and `source-submodules: []` for the `snapcraft` part in `snap/snapcraft.yaml`. * No other changes were made to unrelated parts of the project. ### **Verification** All commands executed successfully ✅ **Environment** * Ubuntu 24.04 (core24 base) * Snapcraft 8.13.0.post1 * Verified using `SNAPCRAFT_VERBOSITY=trace` **Build validation** * ✅ `snapcraft pack` completes successfully * ✅ No submodule initialization occurs (`git submodule` commands absent in logs) * ✅ Built snap installs and runs correctly (`snapcraft --version`, `snapcraft --help` both succeed) ### **Checklist** * [x] Followed the [[guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md) * [x] Signed the [[Canonical CLA](http://www.ubuntu.com/legal/contributors/)](http://www.ubuntu.com/legal/contributors/) * [x] Verified successful `snapcraft pack` build * [x] Ran smoke test to confirm functional snap ### **Fixes** Fixes #5837

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Proposed changes to disable git submodule fetching during Snapcraft builds were closed without merging. The reviewer rejected the contribution, stating the underlying issue cannot be resolved at this time, despite successful local verification and CI passes.
qwen3.6-35b-a3b-mtp-q6 Proposed disabling git submodule fetching during Snapcraft builds to fix #5837. After scope refinement, the maintainer closed the PR and linked issue, stating the problem cannot be resolved now. Changes were not merged.
qwen3.6-35b-a3b-mtp-q6 Proposed changes to disable git submodule fetching during Snapcraft builds were closed without merging. The maintainer determined the issue cannot be fixed currently, rejecting the PR despite successful verification.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#5837 Don't install git submodules during build snapcraft closed Closed following PR #5840 merge. The PR resolved the build optimization request by excluding unused ICU libraries from the snapcraft-libs prime stage, eliminating packaging linter warnings.
76%
#1536698 Git source doesn't support submodules snapcraft (launchpad) closed Abandoned. Snapcraft does not fetch Git submodules during source builds, and the issue was closed without resolution or implementation.
74%
#1817907 building part with git source-commit not found in master fails snapcraft (launchpad) closed Closed without resolution due to inactivity. Snapcraft fails to checkout non-master git commits without a prior fetch, leaving the issue abandoned.
72%