Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 174369 Details for
Bug 235857
app-portage/mirrorselect-1.2: timing is slightly faulty
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
resolve hostname before URL fetch
resolve-hostname-before-fetch.patch (text/plain), 790 bytes, created by
Steven Noonan
on 2008-12-05 23:46:27 UTC
(
hide
)
Description:
resolve hostname before URL fetch
Filename:
MIME Type:
Creator:
Steven Noonan
Created:
2008-12-05 23:46:27 UTC
Size:
790 bytes
patch
obsolete
>--- mirrorselect 2007-12-21 08:46:57.000000000 -0800 >+++ mirrorselect.fixed 2008-12-05 15:36:55.000000000 -0800 >@@ -7,7 +7,7 @@ > __revision__ = '1.3' > > import sys >-import os, time, popen2, re, shutil, signal, shlex, string >+import os, time, popen2, re, shutil, signal, socket, shlex, string, urlparse > from HTMLParser import HTMLParser > from optparse import IndentedHelpFormatter, OptionParser > >@@ -467,6 +467,13 @@ > fetch_cmd = 'fetch -o /dev/null -q %s' % (url) > if fetch == 'curl': > fetch_cmd = 'curl -o /dev/null -s --retry 1' % (url) >+ >+ """ >+ Resolve hostname before fetching to avoid making the DNS resolution >+ latency part of the timing >+ """ >+ hostname = urlparse.urlparse(url).hostname; >+ socket.gethostbyname(hostname); > > stime = time.time() > delta = 0
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 235857
: 174369