Problem: When installing the ports tree using bsdinstall resp. the installer from the installation medium, it gets installed in a way that does not work. The problem described in PR 260955 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260955) is a consequence of this. Workaround: Removing the ports tree and rebuilding it using portsnap creates a functional configuration that does no longer throw this error.
In what way does it not work?
The problem is explained here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260955#c0 After I found out that the problem goes away if I delete the /usr/ports tree and reinstall it using portsnap, I recognized that this is probably rather an issue of incorrect installation of the ports tree than an issue with pkg 1.17, so I closed the original PR mentioned above, and entered this new PR. I don't know whether this was the correct way to handle this; in the hindsight I think I should first have attempted to edit the PR title and other fields, instead of closing the original PR and making a new, more correct one. I apologize for any confusion this caused.
*** Bug 260928 has been marked as a duplicate of this bug. ***
See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260928#c2
If I understand correctly the issue is that: - FreeBSD 13.0 release media includes a copy of the ports tree - That ports tree is relatively old (from the time 13.0-release was built) and includes preunexec and postexec keywords - The keywords are no longer accepted by pkg If this is the case there's not really anything to be done as it is not possible to change the past. The keyword support ought to have been left in place until releases that contain ports trees with those keywords went EOL. Obtaining an up-to-date copy of the ports tree is the right solution.
I thought that "freebsd-update fetch;freebsd-update install" does / is supposed to also update the ports tree. So this was incorrect and portsnap needs to be run for the latter. Thus I apologize for the "Not a bug" PR.