Surely there can be a logical fix here (in the tools) to address this.
Here's my personal opinion on the matter: You ask pkg(8) to do something. It tells you "yes I can do that, but I'll have to remove these packages. Do you want to proceed?". You then tell it to proceed. What is there to fix here? In my opinion the tool performed exactly as per expectations.So if an included core userland tool is having unexpected behavior, then that would constitute "FreeBSD having unexpected behavior".
Lets compare that to a situation where you didn't properly save a document in Microsoft Word or Adobe Photoshop. On the next startup, the software will tell you: "Hey, I have this file recovered for you. Would you like to discard it?". You click yes. It's gone. Is anybody complaining about that?
If the idea is to present the user with more warnings or similar we're basically moving towards an environment where one needs to put a disclaimer on a microwave oven not to dry your dog in it or a printed warning on the cup of the hot coffee you ordered at McDonalds saying that it's actually hot.
What would be next? Every time the user modifies the firewall configuration it should tell you "oh boy, you open ports and stuff, this dangerous!"? Even if, at the end of the day it would ask you "do you want to procedure?" the same way that pkg(8) asked that. If you say yes, there's nothing that can help you.
The important part here is: The user was informed and the user made a choice.
The scenario we're encountering here is simple: The libreoffice installation present on the system in question had a dependency that would no longer be satisfied (or would conflict) during the upgrade. There is no other sane option than removing it (or the user locks the packages and prays to the gods of ABI compatibility).
This is basically what cracauer@ is hinting at. It's not a FreeBSD problem, it's a core problem of applied computer science.
The only way humanity has found to work around (!) this issue is by means of bundles/flatpacks/snaps/static-link-everything which come with their own problems.
So if you use cp(1) to copy a file to a destination that already exists (e.g. "overwriting an existing file") - how does your logic play out here?If I used cp to copy a file and it deleted it instead, I too would be upset. And even if the cp output said, "ok I'll copy your file but I'm going to delete these 3 other files. Is that OK y/n?" I wouldn't ok with that either. cp shouldn't delete files. And in the opinion of several here, "pkg upgrade" shouldn't delete packages either.
		Code:
	
	echo Hello > foo
echo World! > bar
cp bar foo
cat foo
	In any case, I don't think that the attitude in this thread is helping anybody. Let's try to stay nice.