Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 436422 Details for
Bug 585012
[PATCH] Add new FEATURE for GENTOO_MIRRORS shuffle
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
PATCH for adding feature
0001-Add-gentoo-mirrors-shuffle-FEATURE-to-Portage.patch (text/plain), 2.06 KB, created by
Ashish Gupta
on 2016-06-04 12:09:34 UTC
(
hide
)
Description:
PATCH for adding feature
Filename:
MIME Type:
Creator:
Ashish Gupta
Created:
2016-06-04 12:09:34 UTC
Size:
2.06 KB
patch
obsolete
>From da57c314ce0b610e10939b0b7cf482c1fe38f8dc Mon Sep 17 00:00:00 2001 >From: Ashish Gupta <ashmew2@gmail.com> >Date: Sat, 4 Jun 2016 18:08:54 +0900 >Subject: [PATCH] Add "gentoo-mirrors-shuffle" FEATURE to Portage > >Currently, the mirrors defined in GENTOO_MIRRORS are used in the order they >appear in the configuration file (make.conf). In order to split the load of >downloading packages across all listed mirrors more fairly than just using >the first mirror, "gentoo-mirrors-shuffle" FEATURE can be enabled. This is >added as a FEATURE and not a preset because the mirror ordering might be >important for some users of Portage. > >This will also help relay the download requests to several mirrors when using >parallel fetch reducing the chances of speed capping from the mirror. >--- > pym/portage/const.py | 1 + > pym/portage/package/ebuild/fetch.py | 8 +++++++- > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/pym/portage/const.py b/pym/portage/const.py >index 179efce..9bf3397 100644 >--- a/pym/portage/const.py >+++ b/pym/portage/const.py >@@ -148,6 +148,7 @@ SUPPORTED_FEATURES = frozenset([ > "force-mirror", > "force-prefix", > "getbinpkg", >+ "gentoo-mirrors-shuffle", > "icecream", > "installsources", > "ipc-sandbox", >diff --git a/pym/portage/package/ebuild/fetch.py b/pym/portage/package/ebuild/fetch.py >index 1be2800..7951055 100644 >--- a/pym/portage/package/ebuild/fetch.py >+++ b/pym/portage/package/ebuild/fetch.py >@@ -364,7 +364,13 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, > pass > else: > if try_mirrors: >- mymirrors += [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x] >+ if 'gentoo-mirrors-shuffle' in mysettings["FEATURES"]: >+ shuffled_mirrors = [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x] >+ random.shuffle(shuffled_mirrors) >+ mymirrors += shuffled_mirrors >+ del shuffled_mirrors >+ else: >+ mymirrors += [x.rstrip("/") for x in mysettings["GENTOO_MIRRORS"].split() if x] > > hash_filter = _hash_filter(mysettings.get("PORTAGE_CHECKSUM_FILTER", "")) > if hash_filter.transparent: >-- >2.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 585012
: 436422