Bart Smaalders wrote:
> 

>> As an example, I would like to reference how postinstall scripts are 
>> handled, *right now*, with solaris 10 and zones.
>> For those zones that inherit the pkg through pkg-inherit-dir, that zone is 
>> automatically booted into "administrative state", if it is not currently 
>> active.
> 
> So if I upgrade a package on 100 zones, I need to boot, update and shutdown
> 100 different zones, and rewrite 100 different contents files. 

Indeed..... I dont see how ANY package system can get around this.
At minimum, you have to "mount the filesystems", for each and every zone 
there. (that's all that the "administrative state" does now)
You also have to update "something" for each and every zone, that keeps a 
record of what packages are installed on each zone.
Whether that's 100 different "contents files", or 100 different berkeleydb 
files, or [whatever it is IPS uses]... it still has to be done 100 times.

Unless you simply make a zone a pure 100% duplicate of another zone, at the 
package and filesystem level. Which you should really be able to do fairly 
trivially using almost any packaging system, really.

(For example, using SVR4 pkgadd.. rather than the current behaviour of
   "update the contents file, and run the postinstall stuff" for 
pkg-inherit-dir filesystems... it could note, "Hmm. the contents file is 
read-only. Ok, skip updating that, and just run the postinstall stuff")

yes, I realize that some poorly written postinstall stuff would break on 
that. Nothing will get around badly written scripts. It seems that we just 
disagree on where to draw the set grouping lines for "badly written" and 
"broken".





> Most of the reasons to create post install scripts are going away
> completely with IPS.  The ones that remain would likely not work
> anyway, so they will need rewriting.
> 

FYI: I tend to review MOST (but admittedly not all) postinstall scripts in 
blastwave packages.

 From my memory, almost none of them use "hacks" (ie the "installf" calls 
you referred to earlier).
Almost all of them fall into one, or both, of the following categories:

- adding users/groups, etc
- Doing application-specific config file juggling/tweaking, etc.
     ie: doing *nice*, *automated* app-configuration-and-install for the users.

It's almost all "clean" stuff! they would not need rewriting.

also FYI: if I finally managed to focus for long enough this weekend... most 
of the reasons for post install scripts, will be going away in BLASTWAVE 
packages, too :-) But more on that, if I actually complete the work.




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

Reply via email to