I'm trying to overwrite the value of a variable before launching emerge, so: willoughby ~ # PKGDIR="" emerge --info | grep PKGDIR PKGDIR="" it works. It does not work while I try with PORTDIR: willoughby ~ # PORTDIR="/foo" emerge --info | grep PORTDIR PORTDIR="/usr/portage" so If I try to do PORTDIR="/foo" emerge --sync, it sync in /usr/portage.
PORTDIR is deprecated and will be fully unsupported in the future. As documented in `man portage`: "repos.conf Specifies site-specific repository configuration information. Configuration specified in repos.conf can be overriden by PORTAGE_REPOSITORIES environmental variable, which has the same format as repos.conf." Example usage: PORTAGE_REPOSITORIES=$'[gentoo]\nlocation = /foo\nsync-type = rsync\nsync-uri = rsync://rsync.gentoo.org/gentoo-portage' emerge --sync