Merging files

I have no clue what to do please help.. updating to 14.3 It put me in VI, what am I meant to change. ""the following file could not be merged automatically: /etc/group""
1111.jpg
2222.jpg
 
i ran etcupdate but it didnt do anything so
When I got the prompt to "merge" I just followed this
But I didnt delete video:44 because I did not have the other "Video" like he did.

After that I got the same thing but for /etc/master.passwd, i saw another old suggestion to delete a few lines so I did..
and then it told me to /usr/sbin/freebsd-update install, So I did and then it told me to reboot and do it again which I did, and I was in 14.3 now it said.
And then it told me that "install: ///usr/include/c++/v1/__string: No such file or directory", or it said that it was a file but not a directory I forgot. also the same thing but with "__tuple" at the end. so I did what this post said https://forums.freebsd.org/threads/update-path-with-poudriere-packages.99687/post-722898 there were two other files that had a simular message but i figured it would show up again when I rebooted it and ran the install again but It didnt.

Its updating again and it says "removing conflicting directory ///usr/src/sys/contrib/openzfs/cmd/arc_summary"
and
"removing conflicting directory ///usr/src/sys/contrib/openzfs/cmd/zvol_wait"

its been running overnight and the update hasnt completed so I assume its stuck, I assumed it was stuck the last time which is why I did that previous thing.
 
Bot or human? You never know these days...

So what's the question, exactly?

Do you know how to use vi?

Merging files during an upgrade is straightforward. The script compares your files with the stock files it has downloaded and when it finds a difference (which is a given for user/group-related files) it will show you the merged result, that is, both your file and the new file on top of each other.

When not in "insert mode", type "dd" to delete the lines you don't want: anything that looks like a comment, as well as any duplicate of your lines. For example, you delete the stock root user with no password and keep your own root user with the encrypted/salted password.
Then you save the file with "wq".

As for the group file, most of these users and groups are recreated when reinstalling ports/packages.
 
To add to Beastie's excellent post: (a) You will need to know at least the basics of operating vi. It might be possible to switch to different editors, but since at least survival skills in vi are vital (pun!), you might as well get on that with.

(b) You understand how the merged file shows you the sections where the automatic merge detected a conflict? It uses this format:
Code:
<<<<<<<< Name of one version here
The content of
the one version
========
The content of the
other version which
caused a conflict
>>>>>>>> Name of the other version

Your task (should you choose to accept it) is to remove the <<<, === and >>> markers, and select from the two versions of the content the one that is correct. If you fail and leave the <<<... markers, the resulting file will not work, as these lines are pretty much guaranteed to be in an invalid format.

In your particular case, it seems that someone (probably you) added the user "aaa" to the wheel group. I assume you want to keep that after the update too. It also seems that one version has a comment that says "FreeBSD"; you should figure out whether that comment is from the new version (which comes from the upgrade), in which case you should probably keep it in the resulting file. Why? Because then the next upgrade won't complain that the comment vanished again, and not include it in the merge.
 
Run
Code:
etcupdate resolve
and select (e) edit and edit the file.
If you do not know how to edit (what should be the final format), ask here again.
 
To add to Beastie's excellent post: (a) You will need to know at least the basics of operating vi. It might be possible to switch to different editors, but since at least survival skills in vi are vital (pun!), you might as well get on that with.
There's no need to learn vi on FreeBSD because ee is in the base system. I wouldn't recommend even trying, unless you plan to use a vi derived editor regularly. I learned the basics of vi once, but by the time I had cause to use it, I'd forgotten it all. ee is very basic, but it's intuitive enough that you can just pick it up and use it.

Just set EDITOR to ee in the environment.
 
Except for the (admittedly rare) case where EDITOR can't easily be set, or where it is ignored.

I've been using FreeBSD for about 20 year and I've never once needed vi, I think that's probably true of most home users. In my experience the need for vi is mostly to do with having to use other people's practices and systems. Broadly, if you don't need vi for employment, you probably don't need vi at all. The idea that everyone that uses FreeBSD will eventually need vi is just plain wrong.
 
The feature of vi is that it is an editor that requires fewer keystrokes for editing.
In other words, you won't know how good it is until you use it.
 
I've been using FreeBSD for about 20 year and I've never once needed vi, I think that's probably true of most home users. In my experience the need for vi is mostly to do with having to use other people's practices and systems. Broadly, if you don't need vi for employment, you probably don't need vi at all. The idea that everyone that uses FreeBSD will eventually need vi is just plain wrong.
I used to think the same thing. I was proud of the fact that I "didn't even know how to quit out of vi". And when installing and upgrading FreeBSD, I got stuck in vi a half dozen times. Enough so now I know how to be productive but really slow in it. If someone gave me the task of editing the photo at the top of this thread to be correct, using only vi, I would curse and complain, but get it done in 5 minutes. In emacs it would be 2 seconds.
 
I used to think the same thing. I was proud of the fact that I "didn't even know how to quit out of vi". And when installing and upgrading FreeBSD, I got stuck in vi a half dozen times. Enough so now I know how to be productive but really slow in it. If someone gave me the task of editing the photo at the top of this thread to be correct, using only vi, I would curse and complain, but get it done in 5 minutes. In emacs it would be 2 seconds.
I suppose it depends what you mean by learning the basics. Someone once advised me just to learn :q! and what esc does, and then use a crib sheet if vi is needed. However, I've had EDITOR set to ee in shell config for most of the last 20 years and I've never seen vi open unexpectedly.

I think it's feasible that a new user starting on ZFS, and using it properly, will never need to enter single user mode.
 
To add to Beastie's excellent post: (a) You will need to know at least the basics of operating vi. It might be possible to switch to different editors, but since at least survival skills in vi are vital (pun!), you might as well get on that with.
Note that I am a long time vi user but IMHO this shouldn't be required. etcupdate resolve should step you through each conflict and interactively allow you to pick the old or new part of each conflict, with an option to use an editor (and pick one in case EDITOR is not set).
 
Back
Top