← Back to issue list

Snapcraft 7 silently ignores any files ending in *.snap when the source is a folder

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1990166
Type
issue
State
open
Author
~itrue
Labels
—
Created
Updated
Closed
—

Current evaluation

Deliberate behavior: folder sources exclude *.snap files. The maintainer linked the ignore setting, and the exact build reproducer still fails when a needed snap is omitted.

Suggested action: close not a bug

Reason: ~rpjday's follow-up linked the code setting ignore_local_sources=["*.snap"], which remains present in HEAD and is asserted by unit tests. Related bug #1575628 was fixed by PR #535 at commit e00f3f376 specifically to filter built snaps from local sources, demonstrating that this omission is intentional; a warning or documentation improvement could be tracked separately.

Evaluated by: mr-cal-bot

Impact: 24 Quick Win: 15 Complexity: 32 Confidence: 94 Actionability: 91

Issue body

Any files which end in *.snap are not copied to the part/x/src directory, as can be seen from this minimal example: snapcraft.yaml: name: my-snap-name base: core22 version: '0.1' summary: Single-line elevator pitch for your amazing snap description: Test grade: devel confinement: devmode parts: my-part: plugin: nil source: test override-build: | cp ${CRAFT_PART_SRC}/test.snap ${CRAFT_PART_INSTALL}/test.snap --- Snapcraft output: itrue@lxc-jammy:~/tmp/test-snap$ sudo snapcraft --verbose --destructive-mode Starting Snapcraft 7.1.3 Logging execution to '/root/.cache/snapcraft/log/snapcraft-20220919-153058.032639.log' Running on amd64 for amd64 Initializing parts lifecycle Executing parts lifecycle... Executing parts lifecycle: skip pull my-part (already ran) Executing action Executed: skip pull my-part (already ran) Executing parts lifecycle: skip overlay my-part (already ran) Executing action Executed: skip overlay my-part (already ran) Executing parts lifecycle: build my-part Executing action :: + cp /home/itrue/tmp/test-snap/parts/my-part/src/test.snap /home/itrue/tmp/test-snap/parts/my-part/install/test.snap :: cp: cannot stat '/home/itrue/tmp/test-snap/parts/my-part/src/test.snap': No such file or directory 'override-build' in part 'my-part' failed with code 1. Review the scriptlet and make sure it's correct. Full execution log: '/root/.cache/snapcraft/log/snapcraft-20220919-153058.032639.log' --- Source folder contents: itrue@lxc-jammy:~/tmp/test-snap$ ls test test.notasnap test.snap --- parts src folder contents: itrue@lxc-jammy:~/tmp/test-snap$ ls parts/my-part/src/ test.notasnap --- Please either copy all files in the source directory, or at least add a warning to say that these files are not being copied, rather than silently not doing it.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 24
Quick Win: 15
Complexity: 32
Confidence: 94
Actionability: 91
close not a bug Deliberate behavior: folder sources exclude *.snap files. The maintainer linked the ignore setting, and the exact build reproducer still fails when a needed snap is omitted.
stealth/space-bunny-alpha
Impact: 40
Quick Win: 25
Complexity: 30
Confidence: 91
Actionability: 88
keep open Folder-sourced parts intentionally omit *.snap files via ignore_local_sources; despite an exact Snapcraft 7.1.3 reproducer, the silent omission remains unresolved.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 18
Complexity: 30
Confidence: 82
Actionability: 88
needs triage Snapcraft 7.1.3 excludes *.snap files when copying a local source folder into part/x/src; a complete failing reproducer is provided, but the request remains unassessed.
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 19
Staleness: 90
Complexity: 45
Confidence: 70
Support Request: 0
close stale Snapcraft 7 silently ignores *.snap files in source folders. Valid bug with reproduction, never triaged, 1445 days old.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 70
Support Request: 5
close stale Snapcraft 7 silently ignores .snap files in source directories. Unlabeled, zero comments, and inactive for nearly four years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 0
close stale Snapcraft 7 silently ignores *.snap files in source folders. Issue is 1401 days old with no maintainer response, indicating it is stale and likely no longer relevant.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 75
Support Request: 0
close stale Snapcraft 7 silently excludes *.snap files from source directories during build. Unlabeled, unresponded to, and inactive for over three years.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1575628 (confidence 98%)

    Its merged fix, PR #535 at commit e00f3f376, introduced the intentional *.snap local-source exclusion.

Related issues

Issue Project State Summary Similarity
#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.
74%