from /usr/sbin/mirrorselect lines 598-601: if _have_bin('wget'): fetch = 'wget' ipv6 = False but wget supports ipv6 downloads just fine, as long as it's compiled with the 'ipv6' use flag. Rather than digging into the package db to find out, there's a simple check: wget --help omits the ipv4/ipv6-only options if it's compiled without ipv6 support. A grep for that will give you an accurate check of whether wget supports ipv6. 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.) Thanks.
> 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).