paul at gromit.dlib.vt.edu
Thu Nov 6 13:52:06 UTC 2014
On Nov 5, 2014, at 5:40 PM, Peter Ankerstål <peter at pean.org> wrote:
>> On 05 Nov 2014, at 20:29, Paul Mather <paul at gromit.dlib.vt.edu> wrote:
>>> On Nov 5, 2014, at 1:58 PM, Peter Ankerstål <peter at pean.org> wrote:
>>>>> On 5 nov 2014, at 19:53, Scot Hetzel <swhetzel at gmail.com> wrote:
>>>>> On Wed, Nov 5, 2014 at 8:30 AM, Peter Ankerstål <peter at pean.org> wrote:
>>>>> Could someone please explain how to use freebsd-update upgrade without
>>>>> destroying all of your configuration files?
>>>>> I really don't understand how to use the merge function.. In this case i
>>>>> typed :q for all files it asked about. :wq seem to
>>>>> do about the same thing. Notice that a few of the files has this shit in
>>>>> multiple places. I can't be right that I should edit every file manually and
>>>>> look for "current version" and so on?
>>>> Most likely what happened is that when you used :wq it wrote the
>>>> contents of the diff between your current version and the new version
>>>> to your existing configuration files. If you had stuck to using :q,
>>>> it should have left your existing configuration files alone.
>>> This was done with :q only. I dont get it.
>> When you upgrade using freebsd-update, it will try and update configuration files automatically. If there are any configuration files whose differences can't be resolved automatically, it will present that file for editing with the merge conflicts in the file presented. You are then supposed to resolved the conflicts manually.
>> I've always resolved any conflicts, so I've not had any experience if you simply ":q" from the editor, thereby leaving in all the conflict markers. If freebsd-update doesn't check for unresolved conflicts and force you to edit the file again, I presume your configuration file will now basically be invalid.
>> Maybe this is what happened in your case?
> But its too easy to corrupt your setup completely. This is much worse than mergemaster. And I haven’t seen any instructions on this in the handbook.
I agree. I am more used to and more comfortable with source-based updates, but I have fairly recently started using freebsd-update on quite a few servers to help out co-admins newer to FreeBSD, who might be put off by updating from source.
I'm more accustomed to mergemaster, and I like its merge options and way of merging changes to config files. I'm not too familiar with what freebsd-update allows. It does seem that, by default, it's relatively easy to pass on a configuration file with conflict markers in it, which would corrupt your setup, like you say. I don't know whether freebsd-update can be made to stall on a config file until it is free of conflict markers, or whether it would allow you to do a mergemaster-style resolution (i.e., keep old; replace with new; do manual merge; etc.).
I also agree the handbook is fairly light on describing this part of the process, and those who are unfamiliar with resolving merge conflicts using conflict markers may be left bewildered as to what to do at this step.
More information about the freebsd-stable