a simple solution to Package, preinst/postinst/etc

Michal michal-list at auf.net
Thu Feb 17 00:23:08 UTC 2005


> There is the question of where to put the installation and removal code.

This is the crucial issue that comes up again and again. Why not adapt
the simple and effective model of ChangeSet? Ie. solving it by making
it a tool issue, keeping the code in instVars but displaying it
adequately in ChangeSorters. The simplest change that will work would
seem to be:

i. add 4 instance variables to PackageInfo: beforeInstall,
afterInstall, beforeRemoval, afterRemoval.

ii. clone the ChangeSorter to show a list of package and the content
of these 4 variables as a a method in a pane, very much like
ChangeSorter does for the current preamble/postscript.

iii. add a method that creates a SAR from this new PackageInfo,
containing an mcz of the code and relevant (un/)install code in the
standard places ('install/preamble', etc.)

This is a minimal change to the current PackageInfo (ie the list of
classes is still string based matching of categories), it is probably
fairly trivial to implement and meets the requirements.

Why not do that (maybe as a first step towards full fledged packages)?

Michal

ps. for the just-do-it crowd, I can submit a version of it tomorrow,
if there is interest



More information about the Squeak-dev mailing list