DISTDIR

The DISTDIR variable Article description:: defines the location where Portage will store the downloaded source code archives . Its value defaults to on new installations. Previously the default was which resolved to  by default.

This location, which is also often referred to as the distfiles location, will host the source code archives of all software installed (or attempted to install) on the system. This location is not automatically cleaned up, so users should consider using tools such as the command (which comes as part of the  package) to keep the storage used by this location under control. Read the Eclean article for more details.

Users can set the DISTDIR variable in /etc/portage/make.conf:

For more information, please refer to the DISTDIR article.

Source of archives
To download source code archives, portage uses GENTOO_MIRRORS first (to alleviate load on upstream project resources and for other reasons). There is also a SRC_URI parameter in ebuild, which points to original source tarball.