portupgrade keeps bacup packages of the old versions in temporary directory when it is run with -b option. Since portupgrade-20041226_2, this temporary directory is created by mktemp(1) instead of /var/tmp, and removed at the end of the portupgrade process. But as the backup packages are kept in that directory, rmdir fails as follows: ---> [Executing a command as root: sudo /usr/bin/install -m 644 /tmp/portupgrade18478.1 /var/tmp/portupgrade.results] ** Could not clean up temporary directory: Directory not empty - /var/tmp/portupgradeMmWsL1P6 Fix: If the following patch is applied, the backup packages are moved to the directory specified by PKG_BACKUP_DIR environment variable at end of the portupgrade process, and the temporary directory becomes empty before removed. I am wondering whether PKG_BACKUP_DIR should have the default value, and what directory if it should have. So, I decided to keep the old behavior if PKG_BACKUP_DIR is not set (i.e rmdir fails at the end), but this should be changed. How-To-Repeat: Run portupgrade >= 20041226_2 with -b option.
Responsible Changed From-To: freebsd-ports-bugs->knu Over to maintainer.
State Changed From-To: open->feedback Over to new maintainer.
Responsible Changed From-To: knu->daichi Grab.
Responsible Changed From-To: daichi->sem Take all portupgrade related PRs
State Changed From-To: feedback->open Back to open state
State Changed From-To: open->closed Committed a fix based on your submission. Thanks!