I discovered that adding RESTRICT="primaryuri" to one of my own ebuilds has no effect. The source download still tries to download from a gentoo mirror first, then downloads from SRC_URI. cross-checking with ebuilds from the tree has confirmed this wrong behaviour: emerge --fetchonly =dev-db/myodbc-5.1.6 and - to make it even more strange - I found some ebuilds with correct behaviour emerge --fetchonly =sys-cluster/slurm-2.3.4 emerge --fetchonly =sci-chemistry/votca-csgapps-1.2.3 emerge --fetchonly =sci-chemistry/votca-csg-1.2.3 What's wrong here? Are there any requirements for RESTRICT="primaryuri" that are not mentioned in http://devmanual.gentoo.org/general-concepts/mirrors/index.html ?
The different behavior for dev-db/myodbc-5.1.6 is due to the fact that the SRC_URI only contains a mirror uri: SRC_URI=mirror://mysql/Downloads/Connector-ODBC/5.1/mysql-connector-odbc-5.1.6.tar.gz We can fix the fetch behavior to prefer the mysql thirdpartymirrors over GENTOO_MIRRORS when RESTRICT=primaryuri is set.
This is fixed in git: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d1ea4ac22b9b972b684c379434d2a1b8e5f9d933
This is fixed in 2.1.11.20 and 2.2.0_alpha131.