source-subdir says its "a source dir within a repo to build from" but misses that snapcraft will only copy that subdir
Metadata
Current evaluation
Fixed by merged ubuntu-core/snapcraft#344 (commit 6beb6fec6): Snapcraft now copies the full repository while building from the selected source-subdir.
Resolution: closed resolved
Reason: Merged PR ubuntu-core/snapcraft#344, commit 6beb6fec6, changed source handling to copy the entire source even when source-subdir is specified.
Evaluated by: mr-cal-bot
No scores available.
Issue body
sources.py says source-subdir says its "a source dir within a repo to build from", however it makes not mention that it in fact will only copy that subdir into builddir and chop away the rest of the source repo.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged ubuntu-core/snapcraft#344 (commit 6beb6fec6): Snapcraft now copies the full repository while building from the selected source-subdir. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #344: Snapcraft now copies the full repository while building from the directory selected by source-subdir. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by canonical/snapcraft#344: source-subdir now selects the build directory while the entire repository is copied, rather than discarding the rest of the source. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The source-subdir documentation remains inaccurate, failing to specify that snapcraft only copies the designated subdirectory to the build directory. No fixes or comments were added. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or comments. The issue highlighted a documentation gap regarding snapcraft's source-subdir parameter, noting it copies only the specified directory without warning. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
ubuntu-core/snapcraft#344
(confidence 100%)
The maintainer linked this PR as the fix, and its merge commit is 27e36feed.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1600428 Setting source: .. causes pull to fail | snapcraft (launchpad) | closed | Fixed by snapcore/snapcraft#725, adding support for snapcraft.yaml in a subdirectory and preventing recursive source copying. | |
| #349 Backport to 1.x: Copy entire source, even if source-subdir is specified. | snapcraft | merged | Merged into 1.x via #349, backporting #344 so Snapcraft copies the entire fetched source while using source-subdir to select the build directory. | |
| #94 Support the source-subdir keyword for parts | snapcraft | merged | Merged snapcraft#94 via 9fe120945 (implementation 8741af4a3), adding source-subdir support while preserving source trees and delegating build-subdirectory selection to plugins. | |
| #645 If "source: .." do not copy the current directory into itself. | snapcraft | closed | Superseded by canonical/snapcraft#725, merged as a3d662744; it fixed LP #1600428 by excluding the snapcraft.yaml directory from parent-source traversal. | |
| #2256 local source: don't include .snapcraft directory | snapcraft | merged | Merged #2256 (commit abbc92427), fixing LP #1791773 by excluding .snapcraft from local-source copies and stale-part checks. | |
| #1575628 Snapcraft doesn't ignore already-built snaps when `source` is the folder containing the `snapcraft.yaml` | snapcraft (launchpad) | closed | Snapcraft now filters *.snap files from sourcedir, preventing rebuilt artifacts from being copied into part build directories; shipped in version 2.10.1. | |
| #1640675 Add source option for git submodules | snapcraft (launchpad) | closed | Feature request implemented: source-submodules added to git sources, merged as snapcraft PR #3629 (383c1f1ce) and craft-parts PR #169 (3891f255); shipped in Snapcraft 7 and 8. Maintainer closed the2016 Launchpad bug as done. |