It seems to me that, if it were taught about enough configuration file
formats, augeas could fix this (at least for the fairly common case of
configuration files that aren't actually programs in a Turing-complete
language: nothing will save you from manual resolution if you modify a
shell script).
Posted Nov 24, 2009 10:20 UTC (Tue) by michaeljt (subscriber, #39183)
[Link]
Augeas looks nice, but a relatively mechanism-free way of doing this for .debs (the mechanism used could still be Augeas) would be to add support for configuration file updater scripts. Such a script could process a configuration file automatically and return success if it were able to complete the job without making any "unsafe" changes, and failure with an explanatory message otherwise. All messages from a dpkg configuration run could be displayed at the end of that run to avoid interrupting running updates. And packages like upstart, for which other packages are likely to provide configuration files, could export an updater script for use by those packages.
Of course, knowing the Debian packaging system there is probably already a way to do this now.
sudo granularity
Posted Nov 24, 2009 10:48 UTC (Tue) by michaeljt (subscriber, #39183)
[Link]
Posted Nov 24, 2009 12:59 UTC (Tue) by michaeljt (subscriber, #39183)
[Link]
Actually after (re-)reading the page linked to above, I wonder whether a good solution would be to write scripts to do this for individual packages using Augeas and try to get them included upstream. The Debian packagers would be likely to use them, but others might well do so as well, and they would get much wider review. And starting with a few high-profile packages might make the idea catch on :)
Thanks for pointing out Augeas anyway.
sudo granularity
Posted Nov 24, 2009 20:45 UTC (Tue) by nix (subscriber, #2304)
[Link]
I only discovered it yesterday while exploring libvirt's dependencies
(hey, I was bored). It's the first use of even a subset of ML in anger
that I've ever seen.