Summary: | app-portage/mirrorselect thinks wget doesn't handle ipv6 (patch) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Steven Robertson <nihilismwow> |
Component: | Current packages | Assignee: | Portage Tools Team <tools-portage> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | ||
Priority: | Low | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | app-portage/mirrorselect: patch to enable wget ipv6 and remove deprecated warnings |
Description
Steven Robertson
2008-10-30 19:04:58 UTC
> I'm happy to write a patch, although it's worth noting that popen2 is
> deprecated now, so a larger patch to switch to using the subprocess module
> isn't an unwarranted suggestion. (I'd be fine writing and testing that as
> well.)
I'm not officially a Gentoo dev, but I think it's safe to say that patches are appreciated.
Created attachment 174261 [details, diff]
app-portage/mirrorselect: patch to enable wget ipv6 and remove deprecated warnings
Changes: * Popen statements in netselect(), deeptime(), interactive(), and _have_bin() use subprocess.Popen instead of os.popen or popen2.Popen[34]. * getlist() uses urllib2() instead of a popen'd wget. * function _wget_supports_ipv6() added and used. Code should be compatible with python >= 2.4, and now gives no warnings with python-2.6 -3, so it should be okay to use with the 2to3 tool. HTH. Instead of spawning a fetcher like wget or curl, I think it's best to convert the code to download the file with urllib. We can use an alarm signal to implement the timeout behavior. Thanks, this is fixed in mirrorselect-1.4 (includes urllib and popen2 to subprocess conversion). |