On 5/19/26 9:06 AM, Alexandre Detiste wrote:
 > get rid of pkgos_postrm and use
"yours" as a replacement?


No, absolutely not.

I'm asking merely asking that pkgos_postrm, or the framework that insert it in the build also speak the same simplistic "wire protocol" as dh_cruft: that means writing in the resulting .deb a compliant /usr/ share/cruft/<package> listing /var/lib<package-or-something>/ as volatile files not known to dpkg. The purge action is already correctly handled as required by Policy.

It is a similar situation as this: I have a big python machinery that does RPC using python3-pika and marshalling of requests using python annotations. There's a reference python annotation. My DotNet colleague will just talk to RabbitMQ without using my Python library, just using the correct wire protocol.

You can have a look at snake4, it is a tiny game that uses dh-cruft and build in a few seconds.

I know it somewhat not easy to "sell" this idea at large, I m only asking here because I feel that 5 lines of code somewhere will fix this at once for all OpenStack packages then you ll never have to think about it again.

Greetings

Alexandre

Hi Alexandre,
I'm always happy to receive good advice, especially from someone like you who has helped me to make a lot of improvement on the OpenStack packages thanks to so many bug reports.

I had a look into snake4 as you suggested, and the only thing I could see is dh-sequence-cruft as build-depends, and snake4.purge containing /var/games/snake4.score. If I understand well, what it's doing is writing:

/usr/share/cruft/rules/<package>

which contains a list of folders owned by "my" package once it's removed but not purged. Am I correct?

So if I understand correctly, I'd only have to add something like:

echo "/var/lib/<package>/**
/var/lib/<package>" >/usr/share/cruft/rules/<package>

in my postrm scripts?

Please let me know if I understood correctly.

Cheers,

Thomas Goirand (zigo)

Reply via email to