It is recommended to impose additional restrictions on uninstalling the pkdbase package using pkg.

It is recommended to impose additional restrictions on uninstalling the pkdbase package using pkg. Otherwise, the same mistakes made on Linux will be repeated. Currently, running pkg delete pkg requires the -f flag, and I believe this should apply even more strictly to pkgbase packages. According to my testing, it is currently possible to uninstall the kernel using pkg without any obstacles, and after a reboot, the system is gone.

This issue is very common on Linux — inexperienced users often uninstall critical components like the kernel, glibc, or Python. This happens because Linux lacks a concept of a base system and has no mechanism to protect such essential software. FreeBSD, on the other hand, is different: it has a clearly defined base system.

1747530455241.png
 
Otherwise, the same mistakes made on Linux will be repeated. Currently, running pkg delete pkg requires the -f flag
I feel you'd have to want to do something like that, implying it isn't a mistake, implying it shouldn't be limited because inexperienced users might misuse it :p

Why would you want to run that command exactly?
 
pkgbase makes me nervous. I see a lot of potential issues coming our way. I don't think it's going to be as "friendly" as freebsd-update.

I recognize that something has to happen with freebsd-update but it's never given me any issues and little things like having to edit config files just to go between say 14.2-RELEASE to 14.2-RELEASE-p1 are going to be annoying.

I converted a vm to pkgbase and accidentally managed to get version bump to 14.3-BETA3 instead of 14.2-RELEASE-p2 as intended (it was my own fault but a non-obvious outcome and I've been using FreeBSD since sometime around 2.2).
 
My opinions only.
I've never been completely sold on "pkgbase". FreeBSD has always been "kernel and userland should always be in sync" which is why if freebsd-update installs a new kernel you should reboot before freebsd-update to install userland.
Now I can accept the argument that "freebsd-update should really be nothing more than pkg upgrade commands on a correctly packaged base" but I think there are a bunch of details that either need to be worked out/finalized.

example: you are currently on freebsd-14.2-RELEASE-p1 but there is an update so you get 12.4-RELEASE-p2 available. freebsd-update understands if that's just a userland or just a kernel update, but with pkgbase do I have a kernel pkg 14.2-RELEASE and a userland pkg 14.2-RELEASE-p2?
Kind of what dkh talks about.
According to the "pkg" command a 14.3-BETA would be a new version over 14.2-RELEASE-p1 but we don't want that as the default. We want pkg to check for 14.2-RELEASE-p2.

And switching from one to the other as the default in the installer will cause more problems than the csh to sh switch.
 
Back
Top