← Back to issue list

Having a "snap" directory with actual content causes build failures

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1772584
Type
issue
State
closed
Author
~mvo
Labels
—
Created
Updated
Closed

Current evaluation

Resolved by adding build-aux as an alternative location for Snapcraft assets, preserving source-tree snap directories; merged in snapcraft#2496 and #2551.

Resolution: closed resolved

Reason: PR #2496 (commit 4c92c1b89) added support for build-aux/snap, and PR #2551 (commit 7ca0398c5) enabled local plugins from build-aux. The closing maintainer comment confirms build-aux was agreed as the alternative asset trigger.

Evaluated by: mr-cal-bot

No scores available.

Issue body

We are currently working on the "snapd" snap. One roadblock we discovered is that it seems like the "snap" directory is always considered to be "owned" exclusively by snapcraft. For our codebase which contains a "snap" directory with actual content (go code). This is problematic as the pull stage will exclude the "snap" directory in internal/source/_local.py:ignore() which means the export of our source tree is incomplete. The build tree is also using a (different) ignore in pluginhandlers/__init__.py:build() which will also need updating. One simple fix would be to allow ".snap" in addition to "snap" for putting custom plugins (which we use in the snapd snap) and if that dir exists ignore the "snap" dir.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Resolved by adding build-aux as an alternative location for Snapcraft assets, preserving source-tree snap directories; merged in snapcraft#2496 and #2551.
stealth/space-bunny-alpha — closed resolved Resolved by moving project assets to build-aux/snap, with local plugins supported there through canonical/snapcraft#2496 (4c92c1b89) and #2551 (7ca0398c5).
stealth/space-bunny-alpha — closed stale Closed without a fix; the proposed .snap alternative for projects with a populated snap/ directory was not implemented, leaving the build failure unresolved.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The suggested fix to allow ".snap" directories and ignore "snap" was not implemented. Build failures for projects containing actual code in a "snap" directory remain unresolved.
qwen/qwen3.6-35b-a3b — — Closed without resolution or linked pull request. The proposed fix to allow alternative snap directories and update ignore rules was never implemented, indicating the issue was abandoned due to inactivity.
qwen/qwen3.6-35b-a3b — — Closed without resolution or comments. The proposed workaround to use a .snap directory was not implemented, and the issue appears abandoned due to prolonged inactivity.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The reported conflict between source directories and snapcraft's ignore rules was abandoned. No fix or alternative implementation was merged.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft/snapcraft#2496 (confidence 99%)

    Commit 4c92c1b89 added support for storing Snapcraft assets under build-aux/snap.

  • Likely Fixed By: snapcraft/snapcraft#2551 (confidence 97%)

    Commit 7ca0398c5 updated local plugin discovery to use build-aux.

Related issues

Issue Project State Summary Similarity
#274 fix: add build-aux location for snapcraft project fetch-service merged Merged in PR #274 via commit 01a15fb, adding build-aux/snap/snapcraft.yaml as a recognized Snapcraft project path; included in 0.4.1 to address the OSV issue.
74%
#2496 many: support the use of build-aux/snap snapcraft merged Merged PR snapcore/snapcraft#2496 (commit 4c92c1b89) by maintainer sergiusens, adding support for build-aux/snap as an alternative location for snapcraft.yaml and Snapcraft assets, following GNOME conventions (LP: #1805219).
74%
#1661391 snap directory excluded from cleanbuild tarball snapcraft (launchpad) closed Cleanbuild now includes snap/ in its source tarball, fixing missing snap/snapcraft.yaml; merged via snapcore/snapcraft#1102 (e35826ed4).
72%
#1805219 Support for looking in build-aux/snap snapcraft (launchpad) closed Implemented and shipped: snapcore/snapcraft#2496 (commit 4c92c1b89) added build-aux/snap as an alternative location for snapcraft.yaml and assets; LP bug auto-closed by lpqabot after stable revision r18938.
70%
#1558965 Snap building fails due to missing include directory snapcraft (launchpad) closed Fixed by merged PR snapcraft#397: configured include and library paths are now ensured to exist before use.
70%