[Feature Request] Support pre-invoke and post-invoke commands as DPkg::Pre-Invoke and DPkg::Post-Invoke in APT

Bug #1723881 reported by 林博仁(Buo-ren, Lin)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
Wishlist
Unassigned

Bug Description

Etckeeper requires the software management system to run custom commands before and after an operation to allow auto-commiting changes in /etc caused by the software management system.

As an example, Etckeeper creates /etc/apt/apt.conf.d/05etckeeper with the following content to achieve this in APT:

```
DPkg::Pre-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; };
DPkg::Post-Invoke { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; };
```

Please support an equivalent mechanism so that changes in /etc made by Snappy can be easily distinguish from others

Refer this forum post for more info:
https://forum.snapcraft.io/t/counterpart-of-dpkg-pre-invoke-and-dpkg-post-invoke-configurations-in-snappy/2458

description: updated
description: updated
John Lenton (chipaca)
description: updated
Michael Vogt (mvo)
Changed in snappy:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
r0mulux (r-marie) wrote :

Hello,

I'm also very interested by such a feature, in particular execute a script after installation, upgrade, or removal of snap applications.

Regards,

Revision history for this message
Achim Bohnet (allee) wrote :

Having such a feature would be great! Keeping track of /etc/ changes with etckeeper starts to be a pain instead of the great helpful tool is was before snap.

Michael Vogt (mvo)
affects: snappy → snapd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.