Bug#229715: apt: Add a "postinst command spool"
Pierre THIERRY <pierre.thierry@moine-fou.org> writes:
> > And if I install packages with dpkg?
>
> There would be two solutions: the spool could be disabled, and the
> command used to store a command in the spool would execute it
> immediately, or dpkg should also trigger the spool after installing a
> package.
>
> As dpkg can install many packages in one invocation, the spool should be
> used.
>
> > How is the spool any different from an actual postinst file?
>
> When you install a plenty of font packages, each package will, in its
> postinst, run one or many mkfontdir. When an Apache module is installed,
> you will be prompted if you want the configuration files to be modified
> and Apache reloaded for each module package. There is also ldconfig, and
> so on...
>
> With the spool, because these actions are needed only once, they are
> triggered only once, when all files are present.
>
> Quickly,
> le Moine Fou
Ahh, that makes much more sense.
Yes. I support the general idea. But it should be at the dpkg level.
Its probably also more usefull to have a spool of things to run
_after_ configuring packages. All font packages would enqueue an
"update font" into the spool, apache modules an "update apache",
anything with a menu item "update menu" and after all packages are
configured dpkg would run the spool. The spool would be a set (no two
"update font" entries). Spool jobs could also be set to detach itself
(like updating man-db).
Scheduling something to be run just once in an install/upgrade session
is quite complicated currently. A clean and common mechanism for it
would be nice. I was looking for that just last week.
Using it for ldconfig might be a problem though, since postinst
scripts might need ldconfig to have been run for the previous package
before they can function properly.
MfG
Goswin
Reply to: