snapcraft.yaml root level plugs doesn't propagate to hooks
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
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
No evaluation history available.