• how to tell dpkg to not remove some files on package removal/purge

    From Lorenzo@21:1/5 to All on Thu Jun 8 11:30:01 2023
    Hello mentors,

    The runit-services package ships "metafiles" that are parsed by
    a noawait trigger in runit package; the purpose of the trigger is to
    perform actions like (oversimplified) enable/start or stop/disable
    a service when the correspondent binary is installed or removed [1].

    The problem is that when the package is removed, the trigger runs after
    files removal happens so actions like disable/stop (and purge too)
    are skipped;
    is there a way to have those files not removed other than
    making a copy somewhere?

    I think dpkg doesn't remove at least the postrm script of packages,
    else I'm not sure how it could perform a purge action at all.. so I'm
    looking for a way to treat my "metafiles" the same way.

    Best Regards,
    Lorenzo

    [1] Usually debhelper takes care of writing snippets in maintscripts to
    perform such actions, but the design works only when the service file
    and the binary are produced from the same source package and this is not
    the case of runit-services.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)