snapcraft fails to find hooks if ran from snap directory.
Metadata
Current evaluation
2017 report: running snapcraft from the snap/ directory builds without error but omits hooks, causing confusing install failures; proposes enforcing project-root CWD. No maintainer activity in 8+ years; likely obsolete after the core22 rewrite.
Suggested action: close stale
Reason: The issue is 3135 days old with 0 comments, no labels, and zero maintainer interaction, and it targets the pre-rewrite snapcraft (core16-era) which is long unsupported. The modern codebase (visible in the repo layout: craft-based snapcraft/ with models/, services/, parts/) auto-detects the project root from CWD or a snap/ subdirectory and resolves hooks relative to that detected root, so the reported CWD-dependent inconsistency is no longer applicable. The reporter's own proposed fix (bailing unless snap/snapcraft.yaml exists in CWD) was never adopted as a design direction.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
30
Quick Win:
18.0
Staleness:
95
Complexity:
40
Confidence:
65
Support Request:
30
|
close stale | 2017 report: running snapcraft from the snap/ directory builds without error but omits hooks, causing confusing install failures; proposes enforcing project-root CWD. No maintainer activity in 8+ years; likely obsolete after the core22 rewrite. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
35
Confidence:
85
Support Request:
15
|
close stale | Report of snapcraft failing to locate hooks when executed from the snap/ directory instead of the project root, accompanied by unhelpful error messages and a proposal to enforce a specific working directory. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
98
Complexity:
60
Confidence:
95
Support Request:
15
|
close stale | Running snapcraft from the snap/ directory instead of the project root causes hooks to be missed during build/install. Unlabelled, no maintainer response, over 8 years old. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
40
Confidence:
90
Support Request:
30
|
close stale | Snapcraft fails to locate hooks when executed from the snap directory instead of the project root. Unlabelled, no maintainer response, and inactive for over 8 years. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
98
Complexity:
45
Confidence:
85
Support Request:
30
|
close stale | Running snapcraft from the snap directory causes it to miss hooks and break relative paths. Suggests enforcing the project root as the working directory with explicit validation. Issue is open, unassigned, and awaiting triage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1804006 snapcraft.yaml root level plugs doesn't propagate to hooks | snapcraft (launchpad) | open | 2018 report that root-level plugs in snapcraft.yaml are not propagated to the hooks section of generated snap.yaml. No maintainer activity for 7.8 years. Reporter concedes snapd applies root-level plugs to hooks by default, so behavior is likely working as intended. | |
| #1865167 Removing a hook script and building, script still present | snapcraft (launchpad) | open | Snapcraft retains a deleted snap/hooks script in the rebuilt snap because the stale copy in prime/ is never removed; a full clean is required. Open ~6.5 years with zero comments, no labels, and no maintainer response. | |
| #1792078 Snapcraft complain on a non-executable hook named `README.md` | snapcraft (launchpad) | open | Snapcraft build fails when snap/hooks/ contains a non-executable README.md used to document sub-dirs; reporter argues only known hook names should be validated. Open ~8 years, zero comments, no labels or maintainer engagement. | |
| #1659085 snapcraft needs to migrate to a snap directory | snapcraft (launchpad) | closed | Closed without resolution. The proposed migration of snapcraft to a snap directory, including build artifact relocation and plugin updates, was abandoned or superseded by subsequent architecture changes. | |
| #1980089 Compiled snap hooks not executed when packaging with Snapcraft 7 | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft 7.0.3 omitted meta/hooks wrapper scripts for compiled snap hooks, breaking execution. The issue appears abandoned. | |
| #1741091 Installing snapcraft (and its dependencies) | snapcraft (launchpad) | open | Reports a missing 'cd snapcraft' step in the HACKING.md install guide. Open 8+ years with zero comments, no labels, and no maintainer interaction; the referenced HACKING.md no longer exists at the repo root (docs restructured into docs/contribute/). | |
| #2099923 Snapcraft builds are failing: install of snap "snapcraft" failed | snapcraft (launchpad) | open | Snapcraft builds failing due to outdated snapd (2.61) on build infrastructure unable to install core20 base. Issue is 556 days old with no maintainer response. | |
| #1916333 removing a hook from snap/hooks does not remove it from prime/snap/hooks | snapcraft (launchpad) | open | Snapcraft bug: deleting a hook from snap/hooks/ does not remove the stale copy from prime/snap/hooks/, so the hook still ships in the package after a rebuild. Open ~5.5 years, zero comments, no labels, no maintainer response. | |
| #4440 snapcraft configure hook fails: segmentation fault | snapcraft | open | Snapcraft snap's configure hook segfaults on AWS arm64 GitHub runners during install. Maintainer requested diagnostic logs in Dec 2023; reporter never responded. Unlabelled, inactive ~18 months, snap since reworked to core24. | |
| #4285 Snapcraft v7 fails to build core18 snap with local plugins | snapcraft | closed | Snapcraft v7 failed to build core18 snaps with local plugins due to an unredirected snapcraft.sources import. Snapcraft v7.5.3 resolved this by implementing the required legacy import redirection, enabling successful builds. |