Better support for merging local and upstream (was: Erase cache, clean registry in Linux)
>>> Q: How are we going to do that?
>>> A: It's not possible in general.
>> Of course it is, since you can always fall back on the current code in
>> those cases where you don't know how else to do it.
> No, it's not.
> Falling back to the old behavior (not merging changes) is not a technique
> for automatically merging local changes to conffiles. It is refusing to
> solve the problem, not a solution to the problem.
When an upgrade is installed, local changes *have* to be merged with the
changes brought in from the upgrade. That's just an unvoidable need.
Currently, Debian provides very little support for that, mostly
detecting some of the conflicts, showing a `diff' output for those, and
asking the user to choose between one of the two (and leaving it up to
him to refine the merge later using the .dpkg-* files left around).
My proposal is not "Debian should always do it 100% automatically" since
we know trivially it's not possible (unless you find wrong answers
generally acceptable). I just suggest that Debian should work harder,
e.g. using diff3 rather than diff, so that some of the merges can be
>>> When something is impossible, it's impractical to think about how it
>>> would be done.
>> Solving NP-hard problems in a reasonable amount of time is considered
>> (currently and maybe for ever) impossible in general. Yet, people write
>> programs that do that every day.
> No, they don't.
> Instead, they make take the general problem and make it more specific
> through a set of assumptions. This altered problem is no longer NP-hard.
> The provided solution no longer solves the problem in general.
> Alternatively, they make successive approximations of the solution and stop
> when the approximation is "good enough", never actually, exactly solving
> the problem.
Right. And that's exactly what I'm proposing: redefine the problem from
"merge 100% automatically in all cases", to "do it in those cases where
we know how to do it". Suddenly your "impossible in general" becomes