Solved portmaster aborting with "The value of DISTDIR cannot be empty"

On my remaining FreeBSD 9.3 server, this morning I began getting an error when running portmaster:
Code:
oot@boffo:~ # portmaster -a

===>>> The value of DISTDIR cannot be empty
===>>> Aborting update

root@boffo:~ #
I'm not running into this on my servers running FreeBSD 10.2. I have made no changes to the 9.2 server, other than running portsnap fetch update and [FONT=Courier New]portmaster -a[/FONT] daily.

I searched and although I could find posts on similar issues from years past, I couldn't find a relevant solution. One post suggested posting the output after changing the first line of portmaster to #!/bin/sh -x and running [FONT=Courier New]portmaster -a[/FONT] so here's the output from that in case it is helpful:
Code:
root@boffo:~ # portmaster -a
+ trap trap_exit INT
+ umask 022
+ [ -z '' ]
+ PM_PARENT_PID=50380
+ : /tmp
+ /bin/mkdir -p /tmp
+ UPGRADE_TOOL=portmaster
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
+ [ -e /usr/X11R6 ]
+ [ -n '' -a -z '' ]
+ export PM_PARENT_PID TMPDIR UPGRADE_TOOL PATH
+ [ -r /etc/portmaster.rc ]
+ set -o allexport
+ [ -s /usr/local/etc/portmaster.rc ]
+ [ -s /usr/local/sbin/portmaster.rc ]
+ [ -s /root/.portmasterrc ]
+ set +o allexport
+ set
+ my_environment='BLOCKSIZE=K
EDITOR=vi
GROUP=wheel
HOME=/root
HOST=boffo.holdenindustriesinc.com
HOSTTYPE=FreeBSD
IFS='\''
'\''
LOGNAME=root
MACHTYPE=x86_64
MAIL=/var/mail/root
OPTIND=1
OSTYPE=FreeBSD
PAGER=more
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
PM_PARENT_PID=50380
PPID=50251
PS1='\''# '\''
PS2='\''> '\''
PS4='\''+ '\''
PWD=/root
REMOTEHOST=192.168.1.166
SHELL=/bin/csh
SHLVL=1
TERM=xterm
TMPDIR=/tmp
UPGRADE_TOOL=portmaster
USER=root
VENDOR=amd'
+ ps -o uid= 50380
+ [ 0 -eq 0 ]
+ unset PM_SU_CMD PM_SU_VERBOSE
+ [ 50380 -eq 50380 ]
+ [ -z '' ]
+ [ -z '' ]
+ [ -d /usr/ports ]
+ pd=/usr/ports
+ [ -z /usr/ports ]
+ [ -n /usr/ports ]
+ [ ! -r /usr/ports/Mk/bsd.port.mk ]
+ export pd
+ [ -z '' ]
+ [ -z '' ]
+ [ -d /var/db/pkg ]
+ pdb=/var/db/pkg
+ [ -z /var/db/pkg ]
+ [ -z /var/db/pkg ]
+ export pdb
+ [ -z '' ]
+ [ -d /var/db/ports ]
+ port_dbdir=/var/db/ports
+ [ -z /var/db/ports ]
+ [ -n /var/db/ports ]
+ export port_dbdir
+ TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info -x 'pkg(-devel)?$'
+ use_pkgng=yes
+ [ -n yes ]
+ export use_pkgng
+ newopts=' -a'
+ [ -n '' -a -n '' ]
+ [ -n '' -a -z '' ]
+ set -- -a
+ unset var newopts
+ getopts BCDFGHKLPRabde:fghilm:nop:r:stvwx:y COMMAND_LINE_ARGUMENT
+ UPDATE_ALL=aopt
+ getopts BCDFGHKLPRabde:fghilm:nop:r:stvwx:y COMMAND_LINE_ARGUMENT
+ shift 1
+ [ -n '' -a -n '' ]
+ [ -n '' ]
+ [ -n '' -a -n '' ]
+ [ -n '' -a -n '' ]
+ [ -n '' -a -n '' ]
+ [ -n '' -a -n '' ]
+ [ -n '' -o -n '' ]
+ [ -n '' -a -n '' ]
+ unset my_environment COMMAND_LINE_ARGUMENT
+ unset -f packages_init cross_idx test_command_line
+ [ 50380 -eq 50380 ]
+ [ -n '' -o -n aopt ]
+ [ -n '' ]
+ [ -n '' -o -n '' ]
+ [ -n '' ]
+ [ -z '' -a -z '' ]
+ [ -n /usr/ports ]
+ export pd
+ [ -z '' -a '' != only -a -z '' -a -z '' -a -z '' ]
+ pm_make_b -f/usr/share/mk/bsd.port.mk -V DISTDIR
+ DISTDIR=''
+ [ ! -d /root ]
+ [ -n '' ]
+ [ -n '' -o -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' -o -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -z '' -a '' != only -a -z '' ]
+ fail 'The value of DISTDIR cannot be empty'
+ echo -e '\n===>>> The value of DISTDIR cannot be empty'

===>>> The value of DISTDIR cannot be empty
+ echo '===>>> Aborting update'
===>>> Aborting update
+ [ 50380 -eq 50380 ]
+ trap_exit fail
+ echo ''

+ [ -n '' -a -z fail ]
+ [ -z fail ]
+ [ 50380 -eq 50380 ]
+ [ -s '' ]
+ local n=0
+ ps -axo pid,ppid,command
+ grep -v egrep
+ egrep -q '(make -DBATCH checksum|/fetch |\[sh\])'
+ [ -n '' ]
+ safe_exit 1
+ [ -n '' ]
+ [ 50380 -eq 50380 ]
+ parent_exit 1
+ local need_kbc files f count DISCARD show_list
+ [ -s '' ]
+ [ -n '' -a -z '' ]
+ [ -z 1 ]
+ need_kbc=need_kbc_ec
+ [ -n need_kbc_ec ]
+ kill_bad_children
+ local mypgid pid ppid pgid command
+ IFS=' '
+ ps -o pgid= -p 50380
+ mypgid=50380
+ read pid ppid pgid command
+ ps -axo pid,ppid,pgid,command
+ sed 1d
+ [ 0 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 1 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 2 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 3 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 4 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 5 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 6 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 7 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 8 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 9 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 10 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 11 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 12 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 13 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 14 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 15 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 16 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 17 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 18 -gt 25 ]
+ continue
+ read pid ppid pgid command
+ [ 405 -gt 25 ]
+ read pid ppid pgid command
+ [ 481 -gt 25 ]
+ read pid ppid pgid command
+ [ 495 -gt 25 ]
+ read pid ppid pgid command
+ [ 564 -gt 25 ]
+ read pid ppid pgid command
+ [ 602 -gt 25 ]
+ read pid ppid pgid command
+ [ 605 -gt 25 ]
+ read pid ppid pgid command
+ [ 610 -gt 25 ]
+ read pid ppid pgid command
+ [ 634 -gt 25 ]
+ read pid ppid pgid command
+ [ 644 -gt 25 ]
+ read pid ppid pgid command
+ [ 23192 -gt 25 ]
+ [ 56028 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 33828 -gt 25 ]
+ [ 56028 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 35643 -gt 25 ]
+ [ 35643 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 35646 -gt 25 ]
+ [ 35643 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 56028 -gt 25 ]
+ read pid ppid pgid command
+ [ 56037 -gt 25 ]
+ read pid ppid pgid command
+ [ 56056 -gt 25 ]
+ read pid ppid pgid command
+ [ 56058 -gt 25 ]
+ read pid ppid pgid command
+ [ 682 -gt 25 ]
+ read pid ppid pgid command
+ [ 683 -gt 25 ]
+ read pid ppid pgid command
+ [ 684 -gt 25 ]
+ read pid ppid pgid command
+ [ 685 -gt 25 ]
+ read pid ppid pgid command
+ [ 686 -gt 25 ]
+ read pid ppid pgid command
+ [ 687 -gt 25 ]
+ read pid ppid pgid command
+ [ 688 -gt 25 ]
+ read pid ppid pgid command
+ [ 689 -gt 25 ]
+ read pid ppid pgid command
+ [ 35647 -gt 25 ]
+ [ 35647 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 50250 -gt 25 ]
+ [ 50250 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 50251 -gt 25 ]
+ [ 50251 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 50380 -gt 25 ]
+ [ 50380 -eq 50380 ]
+ [ 50380 -eq 50380 ]
+ continue
+ read pid ppid pgid command
+ [ 50398 -gt 25 ]
+ [ 50380 -eq 50380 ]
+ [ 50398 -eq 50380 ]
+ pm_kill 50398
+ kill 50398
+ read pid ppid pgid command
+ [ 50399 -gt 25 ]
+ [ 50380 -eq 50380 ]
+ [ 50399 -eq 50380 ]
+ pm_kill 50399
+ kill 50399
+ read pid ppid pgid command
+ [ 50400 -gt 25 ]
+ [ 50380 -eq 50380 ]
+ [ 50400 -eq 50380 ]
+ read pid ppid pgid command
+ [ 50401 -gt 25 ]
+ [ 50380 -eq 50380 ]
+ [ 50401 -eq 50380 ]
+ read pid ppid pgid command
+ [ -n '' ]
+ [ -d '' ]
+ continue
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n 1 -a -n '' -a -n '' -a -z '' ]
+ exit 1
root@boffo:~ #

Any suggestions as to what may be the cause of the issue?
 
Looks like the problem's been resolved. I just ran portsnap fetch update and the problem no longer occurs. I assume the update to /usr/ports/Mk/bsd.options.mk solved it.
 
Running portmaster -a automatically is a good way to have problems, but that is probably not the problem here.
 
The point is that, if run at all, portmaster -a is done only after checking new entries in /usr/ports/UPDATING.
 
Back
Top