[PATCH setup] Add perpetual support for preremove scripts
Jon Turney
jon.turney@dronecode.org.uk
Wed Jun 29 13:13:21 GMT 2022
On 26/06/2022 17:33, Christian Franke wrote:
> Use case: I ITP etckeeper (https://etckeeper.branchable.com/) which I
> frequently use on Debian. For fully automatic operation, it requires
> pre-install and post-install hooks, e.g:
>
> /etc/preremove/0p_000_etckeeper_pre-install.sh
> /etc/postinstall/zp_zzz_etckeeper_post-install.sh
>
> This patch adds the missing functionality to run the pre-install hook.
> It is limited to /etc/preremove/0p_* because there is possibly no use
> case for /etc/preremove/zp_*.
Thanks.
I'm not sure what you mean by 'there is possibly no use case': That you
don't have one currently, or that you've reasoned that there can't be one?
> 'class Perpetual0RemoveFindVisitor' is borrowed from postinstall.cc and
> modified. It still uses the ugly pre-C++11 hack to disable copy-ctor and
> operator=. Possible refactoring like merging all 3 mostly similar
> visitors into one (or if C++11 is now allowed, use lambda functions
> instead) are left for later.
Yeah, some refactoring would make this simpler and easier to understand. :)
I applied this patch.
Can you please also write a patch for [1] (source in [2]) to document this?
[1] https://cygwin.com/packaging-package-files.html#postinstall
[2]
https://cygwin.com/git/?p=cygwin-htdocs.git;a=blob;f=packaging-package-files.html
More information about the Cygwin-apps
mailing list