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

Re: Changes to menu packgae



joost@rulcmc.leidenuniv.nl (joost witteveen)  wrote on 29.03.97 in <[🔎] m0wAy9V-000CNQC@rulcmc.leidenuniv.nl>:

> No, even that will not do (I'm testing for that at the moment, but it's
> wrong). The thing is, dslects starts one run of dpkg to install hundreds of
> packages, and dpkg only updates the status files after a full run of dpkg,
> so the last of those "hundreds" packages will not see the other "hundreds"-1
> packages, and no postinsts of any of those packages are running.

> on startup: try to open /var/run/update-menu.pid with O_EXCL
[...]
>   When we leave the last loop, we are sure that
>     -there is no dpkg running any more (at least the last status file is
>      saved),
>     -we are the onlu update-menus running.
>   and thus we can do the "old" update-menus stuff, like

I have a vague recollection that this has come up before. How about giving  
dpkg some mechanism to call a command after finishing a bulk install?

I've seen this elsewhere, I believe.

Menu installation is just one thing that can profit here. Anything that  
needs a potentially lengthy cleanup and is used by many packages, but only  
really needs to be done once, qualifies.

For example, we could do something to the man cache after some packages  
installed man pages.

We could rebuild teh X font directories after some packages installed X  
fonts.

And so on.

A general characteristic of all these things is that they aren't specific  
to the package that needs them, so what we'd need would be a mechanism to  
either register exit handlers from the postinst script, or - probably a  
better solution - register them once on installation of the package with  
the cleanup script, and have the script test if there is work.

That is, we might have a new directory - say, /usr/lib/dpkg/cleanups/ -  
where packages could put scripts, and whenever a dpkg run finishes, these  
scripts get called in order. They use some mechanism to sense if there is  
work - something pckage-specific would probably do. If not, they just  
terminate; if yes, they do the cleanup.

Comments?

MfG Kai


Reply to: