local source must not specify parent directories
Metadata
Current evaluation
Reported local-source confinement is obsolete: current craft-parts accepts relative parent paths, and Snapcraft spread tests cover sources ../.. and ../../..
Suggested action: close not a bug
Reason: Current craft_parts/sources/local_source.py accepts a general pathlib.Path without rejecting parent components, while Snapcraft's local-source-subfolders spread fixtures explicitly test source values ../.. and ../../... . The restriction described by the report no longer applies, so documenting it as forbidden would be misleading.
Evaluated by: mr-cal-bot
Impact:
24
Quick Win:
19
Complexity:
10
Confidence:
97
Actionability:
88
Issue body
When building with a local directory and specifying source, the path must be within the current build directory. The documentation could use an update to indicate this. For example, source: ../../my-project/build will not work.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha |
Impact:
24
Quick Win:
19
Complexity:
10
Confidence:
97
Actionability:
88
|
close not a bug | Reported local-source confinement is obsolete: current craft-parts accepts relative parent paths, and Snapcraft spread tests cover sources ../.. and ../../.. | |
| stealth/space-bunny-alpha |
Impact:
20
Quick Win:
17
Complexity:
8
Confidence:
96
Actionability:
90
|
close resolved | The former local-source path restriction is obsolete: parent-relative sources are supported, with recursion safeguards and spread coverage for source: ../.. and ../../... | |
| qwen/qwen3.8-27b |
Impact:
20
Quick Win:
17
Staleness:
90
Complexity:
15
Confidence:
50
Support Request:
35
|
needs triage | 2018 documentation request: local source paths must be within the build directory (e.g. source: ../../my-project/build fails) and the docs should say so. No labels, no comments, no maintainer activity in over 7 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
10
Confidence:
85
Support Request:
40
|
close stale | Issue reports that specifying source paths with parent directories fails during local builds. Suggests documentation update. No activity for 7+ years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
10
Confidence:
85
Support Request:
70
|
close stale | Documentation update requested to clarify that local source paths cannot reference parent directories outside the build directory. Issue has been completely inactive for over seven years with no maintainer response. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
10
Confidence:
85
Support Request:
10
|
close stale | Documentation should clarify that local source paths cannot reference parent directories, as they must remain within the current build directory. Issue remains open with no maintainer response or labels after over 7 years. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #1644350 Runnig snapcraft with sources on parent folders (over one level) causes infinite loops | snapcraft (launchpad) | closed | Fixed by merged snapcore/snapcraft PR #926: local source traversal now excludes generated Snapcraft directories, preventing recursive copies when building from project subdirectories. |