← Back to issue list

Files in path to snapcraft.yaml are excluded in source directive

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2015327
Type
issue
State
open
Author
~kian-parvin
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action: close stale

Reason: The issue has been inactive for over 3 years (1247 days) with zero comments or maintainer engagement. The reported versions are long deprecated, and craft-parts underwent a major architectural rewrite in version 1.0.0 that fundamentally changed how source directives and file exclusion are handled, making the original problem likely obsolete.

Impact: 30 Quick Win: 18.0 Staleness: 95 Complexity: 40 Confidence: 85 Support Request: 10

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
qwen3.6-35b-a3b-mtp-q6
Impact: 30
Quick Win: 18.0
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.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 65
Confidence: 85
Support Request: 10
close stale Reports missing files in source directory when using relative paths in snapcraft.yaml, causing git dirty checks to fail. Issue is specific to older Snapcraft and Core20/22 versions, with no maintainer response or updates in over three years.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1822727 Snapcraft complains the missing `source` property when the source URL is determined in override-pull scriptlet snapcraft (launchpad) open Snapcraft rejects snapcraft.yaml when a part omits `source` because the URL is resolved at runtime in an override-pull scriptlet; reporter suggests deferring the check or adding snapcraftctl set-source. No labels, no comments, no maintainer activity for ~7.4 years.
70%