When using the -P or --package option to portmaster, portmaster stops after the installation of each port. Entering a CR makes it continue. This happens because $DI_FILES is the empty string at this point so "head" expects input from stdin. I made the following change locally which fixed the issue to my satisfaction. diff -u /usr/local/sbin/portmaster pmaster/portmaster --- /usr/local/sbin/portmaster 2023-05-31 15:30:07.762985000 -0400 +++ pmaster/portmaster 2023-09-09 11:14:36.062073000 -0400 @@ -1223,7 +1223,7 @@ di_file_complete= pm_wait_di_file_complete () { - if [ -z "$di_file_complete" ] && [ `head -1 $DI_FILES` = '############' ]; then + if [ -z "$di_file_complete" ] && [ -n "$DI_FILES" ] && [ `head -1 $DI_FILES` = '############' ]; then echo "===>>> Waiting for background read of distinfo files to finish" while [ `head -1 $DI_FILES` = '############' ]; do sleep 1 uname -a FreeBSD happy 13.2-RELEASE-p3 FreeBSD 13.2-RELEASE-p3 GENERIC amd64 pkg info portmaster portmaster-3.26
Thank you for reporting and diagnosing this issue. This case can only happen (AFAIK) when all updates can be performed using existing packages. If no ports need to be built, then $DI_FILES may be empty and the reported issue occurs. The suggested patch has been applied to the portmaster repository, and the port update to version 3.27 will be committed next.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a7ed2d6d98970d9415bd5eafbfa7addf3f25277c commit a7ed2d6d98970d9415bd5eafbfa7addf3f25277c Author: Stefan Eßer <se@FreeBSD.org> AuthorDate: 2023-09-22 17:55:43 +0000 Commit: Stefan Eßer <se@FreeBSD.org> CommitDate: 2023-09-22 17:58:38 +0000 ports-mgmt/portmaster: Fix issue when updating from packages only When using the -P or --package option to portmaster and all updates can be performed without building at least one port, the $DI_FILES variable may be unset. In this situation portmaster stops after the installation of each port. Entering a CR makes it continue. This was reported by Vlad Markov with a suggested fix that has been applied (with a white-space change). PR: 273660 Reported by: dvoich@aim.com (Vlad Markov) ports-mgmt/portmaster/Makefile | 2 +- ports-mgmt/portmaster/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)