Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jun 2023 13:36:36 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        bob prohaska <fbsd@www.zefox.net>, Current FreeBSD <freebsd-current@freebsd.org>
Subject:   RE: Using etcupdate resolve, was Re: Surprise null root password
Message-ID:  <6D6741E7-FC92-4E55-89F5-D1D38D0E8AD9@yahoo.com>
References:  <6D6741E7-FC92-4E55-89F5-D1D38D0E8AD9.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[Note: In this 2nd try, I've indented everything by a tab
to help avoid reinterpretation/reformatting of some of the
text.]

	I'm going to comment about the notations mean, not
	about that the specific type of file is not one
	you would be likely to have other than sn
	official-content-only status for. My notes are yet
	another alternative wording since you are
	uncomfortable with things in this area, just in
	case it helps.

	bob prohaska <fbsd_at_www.zefox.net> wrote on
	Date: Thu, 15 Jun 2023 17:26:48 UTC :
=09
> 	Here's an example of the puzzles faced when using etcupdate
> 	that have so far proved baffling:
>=20
> 	On running etcupdate resolve, the system reports
>=20
> 	Resolving conflict in '/etc/mtree/BSD.tests.dist':
> 	Select: (p) postpone, (df) diff-full, (e) edit,
> 		(h) help for more options: df
> 	--- /etc/mtree/BSD.tests.dist	2023-05-29 08:29:48.174762000 =
-0700
> 	+++ /var/db/etcupdate/conflicts/etc/mtree/BSD.tests.dist	=
2023-06-13 22:55:04.284491000 -0700
> 	@@ -442,6 +442,16 @@
> 		 ..
> 		 ifconfig
> 		 ..
> 	+<<<<<<< yours
> 	+||||||| original
> 	+        md5
> 	+        ..
> 	+=3D=3D=3D=3D=3D=3D=3D
> 	+        ipfw
> 	+        ..
> 	+        md5
> 	+        ..
> 	+>>>>>>> new
> 		 mdconfig
> 		 ..
> 		 nvmecontrol
> 	Select: (p) postpone, (df) diff-full, (e) edit,
> 		(h) help for more options: e
>=20
> 	Selecting option e for edit brings up what appears to be a
> 	vi window, using search I can find the line with mdconfig:
>=20

	For:

> 	<<<<<<< yours
> 	||||||| original
> 		md5
> 		..
> 	=3D=3D=3D=3D=3D=3D=3D
> 		ipfw
> 		..
> 		md5
> 		..
> 	>>>>>>> new

	The:

	||||||| original
	md5
	..
	=3D=3D=3D=3D=3D=3D=3D

	indicates the prior official version's material
	(the middle two lines of the 4 in this case).

	The:

	<<<<<<< yours
	||||||| original

	has an empty middle indicating what was found
	in the file on your machine. The empty middle
	indicates that the "md5" and ".." lines had
	been deleted somehow, relative to want was
	official.

	The:

	=3D=3D=3D=3D=3D=3D=3D
	ipfw
	..
	md5
	..
	>>>>>>> new

	indicates the new official version's content
	for what originally had just the "md" and ".."
	lines.

	You might pick one of the 3 blocks to keep and delete
	the rest of the lines (including <<<<..., =3D=3D=3D=3D...,
	and >>>>...) or you might replace everything
	from <<<<... to >>>>... (inclusive) with the text that
	you know you want in that area.

	(In this case you likely want the new text that also
	has "ipfw" material included.)

	It is possible for a file to have multiple of these
	kinds of "yours...original...new" blocks in the
	file.

> 		mdconfig
> 		..
> 		nvmecontrol
> 		..
> 		pfctl
> 		    files
> 		    ..
> 		..
> 		ping
> 		..
>=20
> 	The puzzle at this point is what to do. It's looks like the
> 	points of interest are the lines marked "yours" and "new",
> 	but I'll admit to bafflement which to modify and whether
> 	the modifications needed include the <<<< and >>>>> characters.
>=20
> 	If there's a relevant man section please point it out.

	"man git-merge" has the following text describing such =
notations:
	(Again I'm not sure how nice the display will end up being.)

	       An alternative style can be used by setting the =
"merge.conflictStyle"
	       configuration variable to either "diff3" or "zdiff3". In =
"diff3" style,
	       the above conflict may look like this:

		   Here are lines that are either unchanged from the =
common
		   ancestor, or cleanly resolved because only one side =
changed,
		   <<<<<<< yours:sample.txt
		   or cleanly resolved because both sides changed the =
same way.
		   Conflict resolution is hard;
		   let's go shopping.
		   ||||||| base:sample.txt
		   or cleanly resolved because both sides changed =
identically.
		   Conflict resolution is hard.
		   =3D=3D=3D=3D=3D=3D=3D
		   or cleanly resolved because both sides changed the =
same way.
		   Git makes conflict resolution easy.
		   >>>>>>> theirs:sample.txt
		   And here is another line that is cleanly resolved or =
unmodified.


	       while in "zdiff3" style, it may look like this:

		   Here are lines that are either unchanged from the =
common
		   ancestor, or cleanly resolved because only one side =
changed,
		   or cleanly resolved because both sides changed the =
same way.
		   <<<<<<< yours:sample.txt
		   Conflict resolution is hard;
		   let's go shopping.
		   ||||||| base:sample.txt
		   or cleanly resolved because both sides changed =
identically.
		   Conflict resolution is hard.
		   =3D=3D=3D=3D=3D=3D=3D
		   Git makes conflict resolution easy.
		   >>>>>>> theirs:sample.txt
		   And here is another line that is cleanly resolved or =
unmodified.


	       In addition to the <<<<<<<, =3D=3D=3D=3D=3D=3D=3D, and =
>>>>>>> markers, it uses
	       another ||||||| marker that is followed by the original =
text. You can
	       tell that the original just stated a fact, and your side =
simply gave in
	       to that statement and gave up, while the other side tried =
to have a
	       more positive attitude. You can sometimes come up with a =
better
	       resolution by viewing the original.

	I found that text via use of:

	# man -K ">>>>>"

	and the looking more at some of the files listed.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6D6741E7-FC92-4E55-89F5-D1D38D0E8AD9>