Scriptlet partitioning

Bazurbat diy-linux-dev@diy-linux.org
Sat, 11 Nov 2006 12:38:16 +0300


Bennett Todd wrote:
> 
>> I'm also not sure about "post". My understanding of various
>> PM's is that "post install scripts" are used to perform various
>> housekeeping tasks that can only be done just after the PM has
>> installed the files onto the file system.
> 
> Yup. While I've not yet been coerced into adding them into bpm, I do
> honestly believe that the full generality offered by rpm is
> ultimately needed: %pre, %post, %preun, and %postun for before and
> after installing and removing the package, with an arg or envar to
> the script to let it figure out whether this is an update or a real
> install or remove. These scriptlets can do format translations on
> config files, adding and removing required userids, whacking
> crontabs, starting and stopping daemons, and like that.
> 

Then, maybe it's better to leave some scriptlets unpartitioned? IMHO too 
much stages is worse then no stages at all. Those, who implementing 
package managers on top of the reference build will need to modify 
scriptlets in either case. Book is needed only as reference for build 
instructions. Most packages fit nicely into basic pattern, so it is easy 
to write some automatic conversion script with manual intervention only 
in the corner cases.

-- 
Bazurbat