[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: update-menus , Re: dpkg and selinux



we goofed

update-menus already has a mechanism to avoid running too many times

from the authors:

>It does not work this way. When update-menus run, it check whether the >dpkg
>lock is taken. In this case it check if the menu lock is taken. If yes,
>it just quit. if not, it take the menu lock and wait until dpkg release
>the dpkg lock. At this time it run normally.



A Mennucc ha scritto:

I tested it and it seems ok; so
I sent the following proposal as a wishlist bug for 'menu'

A Mennucc wrote:

Luke Kenneth Casson Leighton wrote

as an example, 80% of all debian postinst (post install) packages
on my computer result in the running of update-menus.
you don't need to change the whole of the packages to implement the above

just add a few diverts, create some specific locks , and check on exit of APT

example:

$ dpkg-divert --rename /usr/bin/update-menus

--------- file /usr/bin/update-menus
#!/bin/sh
touch /var/lock/post-update-menus
-------- file /etc/apt/apt.conf.d/post-update-menus
DPkg {
Post-Invoke {"test -f /var/lock/post-update-menus && update-menus.distrib ; rm -f /var/lock/post-update-menus ";};
}
------------------

that's all folks
the case of scrollkeeper is obviously the same.
But I would not do this for ldconfig:
what if a package needs a library it depends on to configure itself?

a.







Reply to: