Hi!

On Wed, 2019-11-20 at 11:28:09 +0100, Raphaël Hertzog wrote:
> Package: dpkg
> Version: 1.19.7
> Severity: wishlist
> User: [email protected]
> Usertags: origin-kali

> I just got a lintian warning "uses-dpkg-database-directly" on a script I
> wrote a long time ago:
> https://gitlab.com/kalilinux/packages/kali-menu/blob/kali/master/update-kali-menu
> 
> It's a script started in a postinst and/or in a DPkg::Post-Invoke hook. It
> waits until dpkg is no longer running and then perform some work
> (involving dpkg-divert to replace some files by our own).
> 
> In order to wait until dpkg is no longer running, I try to grab the dpkg
> lock... and thus I have hardcoded /var/lib/dpkg/lock and lintian is not
> happy.
> 
> To achieve this in a more elegant way, could you possibly implement some
> "dpkg --is-running" test ? And/or maybe "dpkg --wait-lock-release" or
> something similar ?

I'm not sure I understand why this is not done say via a trigger
instead? Also why this script cannot just called within the postinst
w/o putting it on the background?

Thanks,
Guillem

Reply via email to