https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280245
--- Comment #3 from John Baldwin <[email protected]> --- The pre-world etcupdate is indeed a bit hackish as it it does not save any updated state to indicate to the next run of etcupdate that it has merged the relevant files. (That is, /var/db/etcupdate/current remains unchanged after a pre-world run.) The assumption was that these files rarely change so having to merge multiple times would be a rare occurrence. The reason for the conflicts is that diff3's 3-way merge does not know how to handle when adjacent lines both change but from different sources (e.g. in the first hunk you added more users to wheel, and upstream FreeBSD removed the two comment lines). For the second hunk, the reason for the conflict is less clear as the output seems managled (there is no `<<<<<<< yours` line before the conflict for example). In my recent experience the painful merges for the pre-world files have mostly consisted of the removal of the comment lines at the start of the file, and changing root's shell. Handling those types of changes in a more automated fashion would require specialized handling for these files that understands their file format vs just using diff3 to compare text. Such handling is likely non-trivial to implement with etcupdate's constraints of not using tools outside the base system. Presumably pkgbase will also not user etcupdate but instead use its own approach for updating /etc files (though it also uses diff3 under the hood so will likely have the same issues). I have no idea if pkgbase upgrades have a way to deal with the pre-world step of adding new users/groups btw. It might be that they don't care since tar will just create the files with numeric IDs that will get mapped to names later when the files in /etc are updated? -- You are receiving this mail because: You are the assignee for the bug.
