Page MenuHomeFreeBSD

freebsd-update: Fail if there are any unresolved conflicts
Needs ReviewPublic

Authored by aryeeteygerald_rogers.com on Jan 24 2019, 6:09 PM.

Details

Reviewers
emaste
delphij
Summary

Unresolved conflicts can break system files so it is important to make sure that
the user fixes all of them.

PR: 185546

Test Plan

None

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 22125
Build 21346: arc lint + arc unit

Event Timeline

An error or forcing them to resolve it manually again may be better.

  • Change unresolved conflict warning into an error
aryeeteygerald_rogers.com retitled this revision from Warn users about unresolved conflicts to freebsd-update: Fail if there are any unresolved conflicts.Jan 24 2019, 6:27 PM

This makes "+<+ current version" a magic line that must never appear in any configuration file, are we ok with that?

This makes "+<+ current version" a magic line that must never appear in any configuration file, are we ok with that?

Note that it is anchored to ^ and $ so must be exactly that line -- I think this restriction is OK.

Also I perform a diff against the old version first so they must have added a line that looks like the diff marker during conflict resolution. This seems very unlikely.

Also I perform a diff against the old version first so they must have added a line that looks like the diff marker during conflict resolution. This seems very unlikely.

A common tactic to resolve but leave intact the issue if the specific file has a form of #if 0 #end construct is to do exactly that and leave it for later resolution, I think that your use of magic would prevent that methodology. Always always always try to not make magic things, history has repeatedly shown us that they are bad.