Dos and Don'ts for pre- and post-install in ports
Ports should be built with the idea in mind that people won't execute the *-install scripts. They're here to simplify installation of large software packages like gnome or kde which fail to build if post-install commands are not executed inbetween certain ports.
We don't want to encourage people to not know what happens on their system. Example: If a port adds a user to the system using pre-install, the CRUX user will most certainly not know about this and therefore forget to remove the user account if she/he removes the port. If packagers start to create *-install scripts for trivial ports, people might just blindly execute the scripts and not
know what this is all about. A scenario I'd like to avoid :-)
Dos
- Always document all steps of the pre- and post-install scripts in the README, so users can do it themselfs if they don't like pre- and post-install scripts
- Execute fc-cache and similar commands
- Make sure they don't produce errors when they are executed every time a port is updated (e.g. don't try to add users which don't exist). Note: We might provide some helper scripts in a CLC port with functionality like "add a user if it doesn't exist" etc.
Don'ts
- Edit configuration files ? (should e.g. the nvidia driver change modules.conf? I think no)
- Remove other packages (ie: exim needs sendmail to be removed, another example is cups/lprng)
- Restart servers
- Request for user input ? pre/post install scripts should not be interactive.