Activity log for bug #1877448

Date Who What changed Old value New value Message
2020-05-07 20:04:21 Ted Gould bug added bug
2020-05-07 21:07:51 Ted Gould description Working on adding some font hooks for the Inkscape package it was my first time using hooks, and I found it kinda confusing. I think this largely steamed from the fact that the hooks section works differently than the parts and apps sections. The hooks section is abstractly like this: hooks.$trigger.$parameter Where apps and parts are mostly like this: apps.$name.$parameter I think that the $name attribute is useful for organization and allows for more flexible hooks. For instance I'd suggest what is now: hooks: configure: plugs: [ desktop ] Would look more like this: hooks: update-font-cache: trigger: [ configure ] command: update-font-cache.sh plugs: [ desktop ] This would allow for better organization and documentation of hooks. Of course this would require some translation as snapd expects the original format. But that could be achieved with Snapcraft building a shell script for each trigger calling the appropriate hooks. Working on adding some font hooks for the Inkscape package it was my first time using hooks, and I found it kinda confusing. I think this largely stemmed from the fact that the hooks section works differently than the parts and apps sections. The hooks section is abstractly like this: hooks.$trigger.$parameter Where apps and parts are mostly like this: apps.$name.$parameter I think that the $name attribute is useful for organization and allows for more flexible hooks. For instance I'd suggest what is now: hooks:   configure:     plugs: [ desktop ] Would look more like this: hooks:   update-font-cache:     trigger: [ configure ]     command: update-font-cache.sh     plugs: [ desktop ] This would allow for better organization and documentation of hooks. Of course this would require some translation as snapd expects the original format. But that could be achieved with Snapcraft building a shell script for each trigger calling the appropriate hooks.