← Back to issue list

snapcraft.yaml root level plugs doesn't propagate to hooks

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1804006
Type
issue
State
open
Author
~anonymouse67
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action: close stale

Reason: The issue has zero comments, no labels, and no maintainer interaction in 2842 days (~7.8 years), and the reporter themselves notes 'the root level plugs in the snap.yaml also by default cover the hooks too' in snapd, meaning the generated snap.yaml is valid and the original concern is no longer applicable. Snapcraft has also been fully rewritten (core22/core24) since this report, so the affected code paths no longer exist.

Impact: 15 Quick Win: 12.0 Staleness: 95 Complexity: 20 Confidence: 65 Support Request: 20

Issue body

If you have a snapcraft project setup with the snap/hooks folder with any kind of hook in it, and a root level plugs specification in your snapcraft.yaml like so: ```yaml name: test-snapcraft-root-plugs version: '0.1' summary: test of snapcraft.yaml root level plugs and hooks description: test root level plugs in snapcraft.yaml grade: devel confinement: devmode plugs: home: {} removable-media: {} network: {} network-bind: {} apps: test-snapcraft-root-plugs: command: echo "hello" parts: my-part: plugin: nil ``` the generated snap.yaml has the same root level plugs spec, but nothing about the hook: ```yaml name: test-snapcraft-root-plugs version: '0.1' summary: test of snapcraft.yaml root level plugs and hooks description: test root level plugs in snapcraft.yaml architectures: - amd64 confinement: devmode grade: devel plugs: home: {} network: {} network-bind: {} removable-media: {} apps: test-snapcraft-root-plugs: command: command-test-snapcraft-root-plugs.wrapper ``` The snap.yaml should also propagate to the hooks spec in the snap.yaml, specifying something like this: ```yaml hooks: configure: plugs: - home - network - network-bind - removable-media ``` This could also be considered a snapd bug where the root level plugs in the snap.yaml also by default cover the hooks too.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 15
Quick Win: 12.0
Staleness: 95
Complexity: 20
Confidence: 65
Support Request: 20
close stale 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.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 5
close stale Root-level plugs in snapcraft.yaml are not propagated to generated hooks in snap.yaml. The report is over 7 years old with no maintainer response or activity, and likely obsolete due to significant snapcraft and snapd architectural changes.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 50
Confidence: 75
Support Request: 10
close stale Root-level plugs in snapcraft.yaml are not propagated to hooks in the generated snap.yaml. The report lacks maintainer interaction, labels, and is over 7 years old.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 30
Confidence: 85
Support Request: 15
close stale Root-level plugs in snapcraft.yaml are not propagated to generated snap.yaml hooks. Reported over 7 years ago with zero maintainer interaction. Likely irrelevant to current snapcraft/snapd versions.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 35
Confidence: 85
Support Request: 10
close stale Root-level plugs in snapcraft.yaml are not propagated to hooks in the generated snap.yaml. The report has zero comments, no maintainer response, and is over seven years old with no activity.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1746403 snapcraft fails to find hooks if ran from snap directory. snapcraft (launchpad) open 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.
74%