Starting portmaster in /sys/conf (by chance, the shell where I ran it had been changed to this directory for an earlier task) causes the following error : # portmaster openjpeg ===>>> The ports directory ( make: stopped in /usr/src/sys/conf) does not seem to contain a ports tree ===>>> Aborting update Apparently portmaster looks for some files in some places, with $cwd early in the directories search list and /sys/conf contains an homonym.
/usr/local/sbin/portmaster: 358 + if [ "$PWD" = "/usr/src/sys/conf" ]; then 359 + pm_cd $HOME 360 + fi
A commit references this bug: Author: se Date: Sun Jan 26 19:00:18 UTC 2020 New revision: 524228 URL: https://svnweb.freebsd.org/changeset/ports/524228 Log: Make portmaster fall back to other locations if invoked in, e.g., /sys/conf. PR: 237061 Approved by: antoine (implicit) Changes: head/ports-mgmt/portmaster/Makefile head/ports-mgmt/portmaster/files/patch-portmaster