Hi,

On Fri, 2008-05-02 at 21:18 -0700, Jordan Brown (Sun) wrote:
> Laszlo (Laca) Peter wrote:
> > I suggest you read this thread:
> > http://mail.opensolaris.org/pipermail/pkg-discuss/2008-April/002625.html
> 
> Yes, pretty much exactly my concern, thanks.
> 
> OK, so assuming that we get a mechanism to trigger an SMF service that 
> will do whatever needs doing, a few thoughts:
> 
> - Presumably this service could be one that had just been installed and 
> its manifest imported through some canned add-service action.

Correct.

> - It seems like it would be useful to have a service that executes all 
> of the scripts dropped into a particular directory, exactly once, at the 
> next convenient time.  Most postinstall scripts could be turned into 
> scripts to be executed through such a mechanism.

This idea is pretty similar to what postrun is in SVr4.
See PSARC/2008/078.  Postrun could be easily modified to
execute scripts dropped in a directory if they are
newer than a time stamp.

> - It is mildly bothersome that the script execution is separated from 
> the installation.  If the installation proper fails, the failure is 
> reported as a failure of the installation.  If, on the other hand, one 
> of these deferred scripts (or whatever deferred actions) fails, the 
> failure is probably reported off in some obscure SMF log, and almost 
> certainly not reported back through the installation UI.  

Yup, we had issues with this in GNOME.  We also needed to add a
hook in gnome-session to wait for certain deferred actions to complete.

> The 
> asynchronous nature of the execution may also be a problem - what 
> happens if the user immediately removes a package just added, while its 
> deferred actions are running?

Interesting point.  Doing this properly can easily result in
monster script like we had in SVr4-land.

> - Preinstall and preremove scripts are still problematic.  (Presumably 
> postremove scripts could be handled similarly to postinstall scripts, by 
> triggering a service to run after removal.)  Note that preinstall 
> scripts are desirable if you want to install files as a newly created user.

The case of a newly created user is covered.  Other preinstall script
may be a problem, though.

Laca


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to