freebsd-update will open ${EDITOR} if conflicts occur while merging updates to config files. Inform the user if they've left conflict markers behind, and go back to editing the file.
PR: 185546
PR: 229689
Differential D37703
freebsd-update: re-edit files if merge conflict markers remain emaste on Dec 14 2022, 5:37 PM. Authored by Tags None Referenced Files
Subscribers
Details
freebsd-update will open ${EDITOR} if conflicts occur while merging updates to config files. Inform the user if they've left conflict markers behind, and go back to editing the file. PR: 185546
Diff Detail
Event Timeline
Comment Actions This appears like it will get suck in a infinite loop when it finds #PROBLEMS!==== in /etc/services. It should have code that says something like "There still seem to be problems but is this ok?" as there can always be files that match whatever the <. = and > regex is used. If anyone is doing some major work with this, I would love to see a "There are %d files needing merged by hand" along with "press ! for a shell" which drops the user into the proper area and suggests a diff command. When the answer to "does this look ok" is "N", it should try something other than bailing out. Also the select/edit prompt should have a edit/old/new option. If it is a system file, the users rarely wants the older file. If there are too many changes, perhaps some instructions offering help about using the --currently-running option could be useful including files useful to figure out what the installed version is or at least provide some help via SCCS ids. Comment Actions
Note that the regex is anchored to the beginning of the line, so will not match #PROBLEMS!==============================================================
Yeah, good idea. Could be something like Merge conflict markers remain in: ${F} These must be resolved for the system to be functional. Press Enter to return to editing this file, or type "ACCEPT" to carry on with these conflict markers remaining in the file. |