We should provide a framework for INSTALL files in order to be able to make changes to in Flatconf structures (ie. adding/deleting a variable) without loosing current configuration data.
I believe it wouldn't be feasible to do so in general way in package manager, because one'll always need to embed some logic into translation from old to new configuration (consider splitting one text field with internal syntax (e.g. "interface1, interface2, interface3") into a list).
Some ideas copied from #127:
- generally, we should by default interactively warn the user when he wants to upgrade a package and a change to the fc configuration is needed
- if he answers no, then package upgrade is aborted
- if the pkg tool is run in batch mode (pkg --batch?), we should only notify him what has been changed in the configuration (so what he should probably take a look at)
- the functions in INSTALL are given the old and new package versions, so they should probably base on this to know what to do
- extracted contents of *new* /etc/fc should be temporarily available somewhere for the the INSTALL script (so it can just copy some new elements when it's sufficient)
- interactive questions to user should have reasonable defaults (in case we run in batch mode and stdin has already been closed)
- special care should be taken about list elements
Generally, we should provide an upgrade path to 2.1 and possibly to 3.0 without needing to reinstall the whole system.