Ebuild Protip: Only fetch from SRC_URI
ebuild go to download files, they will try to download from the Gentoo mirrors first.
Sometimes, you want to avoid this. There’s two scenarios:
- You’re developing the ebuild, so the files won’t be on the mirrors (yet), so you want to save yourself the time spent checking the mirrors
- Something necessitates always using the SRC_URI source explicitly.
To elect to not use the mirrors on a command by command basis, you can do:
$ GENTOO_MIRRORS="" ebuild foo-1.2.3.ebuild manifest
Typically, you define
/etc/make.conf. We can temporary set it to nothing when we invoke
ebuild, which results in the
SRC_URI being used first.
To prevent the ebuild from ever being populated to the mirrors, you need to add the following to your ebuild:
Technically, this can go anywhere in the file. However, the common convention seems to be to put it after