Contributed by merdely on from the reiteration dept.
Following up on a previous story, the recent changes to sudo(8) impact that way ports and pkg_* tools work when used with sudo. Sudo now scrubs the environment before executing commands run with sudo. That means that commands like pkg_add will not know about $PKG_PATH (and other variables).
Note the following line in /etc/sudoers which will be in 4.2:
Defaults env_keep +="DESTDIR FETCH_CMD FLAVOR FTPMODE MAKE MULTI_PACKAGES OKAY_FILES PKG_DBDIR PKG_DESTDIR PKG_CACHE PKG_PATH PKG_TMPDIR PORTSDIR RELEASEDIR SUBPACKAGE"
People using ports have to be particularly aware of these changes. Many people are already being caught with this and we want to avoid flooding the mailing list with these problems. Make sure you update your /etc/sudoers file when you upgrade.
[Update 2007/08/16: millert pointed out inaccuracies in the story which have been corrected.]
(Comments are closed)