Most of the gentoo kernel packages specify their original kernel sources as: SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2" For a 2.4-based kernel, this is not so much of a problem because all the gentoo mirrors have copies of recent 2.4 kernels. However, in the case of development-sources (2.5), these kernels are never on the gentoo mirrors, and so a trip to www.kernel.org is always required. I propose adding an additional mirror to /usr/portage/profiles/thirdpartymirrors: kernel http://www.us.kernel.org/pub/linux/kernel http://www.kernel.org/pub/linux/kernel (and possibly some other non-US sites that are fast) Then in the ebuilds, OKVS=(${OKV//\./ }) SRC_URI="mirror://kernel/v${OKVS[0]}.${OKVS[1]}/linux-${OKV}.tar.bz2" Better still, this can be set in the kernel eclass. (development-sources does not use the kernel eclass at the moment)
I agree completely, but I'm not the dude to do it, cuz I have NO IDEA how to set that up and no real urge to know.
I'll add them to the mirror descriptions
I just committed this. lostlogic, could you please test this change on kernel ebuilds? CC'ing pfeifer for the same reason.
Should be all set, in any case.
Quick follow-up: Is the order of mirror sites significant? The new line lists www.kernel.org as the first mirror. If they are tried in the listed order, then the main site will be hit first, which is not exactly what I had in mind. We ought to try mirror sites first. If they are tried in reverse or random order, then it's probably fine. From my testing, it appears to try them in the listed order. To test, I changed the ebuild for development-sources to use: SRC_URI="mirror://kernel/v2.5/linux-${OKV}.tar.bz2 ${PATCH_URI}" It went to www.kernel.org first (after the GENTOO_MIRRORS). I would think the best policy would be to randomize the list of mirrors before fetching sources so as to spread the load, but for all I know, it's Gentoo's policy to list the primary site first. kernel http://www.kernel.org/pub/linux/kernel/ http://www.us.kernel.org/pub/linux/kernel/ http://www.de.kernel.org/pub/linux/kernel/ http://www.fr.kernel.org/pub/linux/kernel/ http://www.uk.kernel.org/pub/linux/
I did that because kernel.org has a significantly massive amount of bandwidth and my assessment was that the only time we should need to use a different mirror is when kernel.org is down for whatever reason. If you don't agree with that, I have no problem with adjusting the order.
this is as good as it is your wish is in bug #9321 adding yourself cc to watch it
how about remove /kernel from the thirdpartymirrors, cause then we could use this mirror for some other ebuilds. eg. modutils now: mirror://kernel -> http://www.us.kernel.org/pub/linux/kernel my idea mirror://kernel -> http://www.us.kernel.org/pub/linux then in modutils we could use mirror://kernel/utils/kernel/${PN} and in kernel mirror://kernel/${PN}/2.4/${P}.tar.bz2
I don't object to this (much), though for fetching kernel sources, we would need: OKVS=(${OKV//\./ }) SRC_URI="mirror://kernel/kernel/v${OKVS[0]}.${OKVS[1]}/linux-${OKV}.tar.bz2" If it's legal to put periods in the mirror name, then I would suggest an additional thirdpartymirrors line for this function: kernel.org http://www.kernel.org/pub/linux ... Or, is this legal? (assuming current line): SRC_URI="mirror://kernel/../utils/kernel/${PN}/v2.4/${P}.tar.bz2" My testing indicates that it works: # GENTOO_MIRRORS="" emerge -f modutils Calculating dependencies ...done! >>> emerge (1 of 1) sys-apps/modutils-2.4.25 to / >>> Downloading http://www.kernel.org/pub/linux/kernel//../utils/kernel/modutils/v2.4/modutils-2.4.25.tar.bz2 --08:19:35-- http://www.kernel.org/pub/linux/utils/kernel/modutils/v2.4/modutils-2.4.25.tar.bz2 => `/usr/portage/distfiles/modutils-2.4.25.tar.bz2' Resolving www.kernel.org... done. Connecting to www.kernel.org[204.152.189.116]:80... connected. HTTP request sent, awaiting response... 200 OK Length: 220,530 [application/x-bzip2] 100%[====================================>] 220,530 66.06K/s ETA 00:00 08:19:39 (66.06 KB/s) - `/usr/portage/distfiles/modutils-2.4.25.tar.bz2' saved [220530/220530] The question is, which is uglier: having mirror://kernel/kernel/... for getting kernel sources, or having mirror://kernel/../... for getting other things
ok modutils uses now mirror://kernel mirror://kernel/../... is uglier for tools