Files in path to snapcraft.yaml are excluded in source directive
Metadata
Current evaluation
Core22 builds with Snapcraft 7.3.1 omit files from a source: ../.. tree and produce a dirty Git version; Core20 and Snapcraft 4.8 do not. The report is untriaged.
Suggested action: needs triage
Reason: The report provides a concrete layout, command, and controlled version matrix: Snapcraft 7.3.1 with Core22 fails, while 7.3.1 with Core20 and 4.8 with Core22 pass. It has no labels, maintainer response, full part YAML or logs, and inconsistently refers to snaps/ and snap/, so the base-specific source-copy cause and regression test still need triage.
Evaluated by: mr-cal-bot
Impact:
45
Quick Win:
13
Complexity:
58
Confidence:
80
Actionability:
68
Issue body
Hi,
I have a potential bug when building a Snap where some files from my source directory are missing when I build the snap.
I have a project with a similar directory structure to the below where my snaps are in a subdirectory.
my-app/
├─ internal/
├─ snaps/
│ ├─ core20/
│ │ ├─ snapcraft.yaml
│ ├─ core22/
│ │ ├─ snapcraft.yaml
├─ src/
│ ├─ stuff.go
├─ .gitignore
├─ Makefile
In my snapcraft.yaml files I have a directive `source: ../..` and the problem I'm encountering is that when I build, specifically the core22 snap, all the files in snap/ are not present inside the folder `parts/<part-name>/src`.
I noticed this because I use `git describe --tags --dirty` to get the version info for my snap but each build of the core22 snap was output a version with "-dirty" appended. Debugging the build I can see that all the files in snap/ are missing and git thinks the directory has been modified.
Testing Info:
I ran the build inside a lxd container with the command `sudo snapcraft --enable-manifest --destructive-mode`
I tested this with the following pairings:
Snapcraft 7.3.1 and Core22: Bug present
Snapcraft 7.3.1 and Core20: No issue
Snapcraft 4.8 and Core22: No issue
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
45
Quick Win:
13
Complexity:
58
Confidence:
80
Actionability:
68
|
needs triage | Core22 builds with Snapcraft 7.3.1 omit files from a source: ../.. tree and produce a dirty Git version; Core20 and Snapcraft 4.8 do not. The report is untriaged. | |
| stealth/space-bunny-alpha |
Impact:
45
Quick Win:
11
Complexity:
55
Confidence:
62
Actionability:
55
|
needs triage | Bug report: with `source: ../..` from a snapcraft.yaml in a subdirectory, files under the snap/ tree are missing from parts/<part>/src, making git describe report -dirty. Reproduced on Snapcraft 7.3.1 + core22 only; no comments or maintainer triage in ~3.5 years. | |
| stealth/space-bunny-alpha |
Impact:
40
Quick Win:
14
Complexity:
57
Confidence:
81
Actionability:
82
|
needs triage | Snapcraft 7.3.1 on core22 omits files from a snap/ subtree when a part uses source ../..; core20 and Snapcraft 4.8 are unaffected, and the report is untriaged. | |
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
30
Quick Win:
18
Staleness:
95
Complexity:
40
Confidence:
85
Support Request:
10
|
close stale | Bug report about files in the source path being excluded when using source: ../.. in snapcraft.yaml. Open for over 3 years with no activity or maintainer response. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
30
Confidence:
85
Support Request:
10
|
close stale | Bug report regarding missing files in source directory during Snapcraft builds for Core22, reported over 3 years ago with no maintainer response. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
60
Confidence:
90
Support Request:
10
|
close stale | Source directive excludes parent directory files during Core22 builds. Untriaged, inactive for over 3 years, no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
55
Confidence:
70
Support Request:
10
|
needs triage | Regression in Snapcraft 7.3.1 where source: ../.. excludes parent directory files for Core22, causing missing files and incorrect git version detection. Untriaged, inactive for over 3 years. |
Update history
| Date | Change |
|---|---|
| created |
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. |