i have PORTAGE_BINHOST pointing to http url where the .tbz2 files reside, defined in /etc/make.conf and when i run 'emerge -u world -gk -vpt' it will not respect $http_proxy set via env, via /etc/make.conf and thus failing to fetch packages info. i also tried to set FETCH_COMMAND in /etc/make.conf to wget (wget works fine with proxy), but seems that the 'info fetching phase' is done by portage itself (compared the useragent string in apache log) X.X.X.X - - [26/Aug/2004:21:20:58 +0300] "GET /HOSTNAME/ HTTP/1.1" 200 75877 "-" "-" X.X.X.X - - [26/Aug/2004:21:21:14 +0300] "GET /HGOSTNAME/kdebase-3.2.3-r1.tbz2 HTTP/1.0" 200 20229076 "-" "Wget/1 .9" Reproducible: Always Steps to Reproduce: 1. define PORTAGE_BINHOST in /etc/make.conf 2. set http_proxy pointing to some working proxy. also check that no_proxy does not exclude $PORTAGE_BINHOST 3. run emerge -guk world -vpt 4. see which ip you have in apache log of $PORTAGE_BINHOST, proxy or real ip where you ran 'emerge' Expected Results: portage to use $http_proxy all the time :)
using portage-2.0.50-r10, PORTAGE_BINHOST="http://gentoo.XXX.TLD/HOSTNAME/" from /etc/make.conf
Try this patch. http://zarquon.twobit.net/gentoo/portage/getbinpkg.py.diff
(In reply to comment #2) > Try this patch. > > http://zarquon.twobit.net/gentoo/portage/getbinpkg.py.diff Did that patch actually work for anyone, is there someone who uses BINHOST who can test it?
Created attachment 69378 [details, diff] Patch for the version 2.0.51.22-r1, applied to lib/portage/pym/getbinpkg.py This patch contains the code to make the http_proxy variable work, but it doesn't get the value from make.conf, since this would be a much larger patch. It also has a workaround for the strange squid behavior when making requests with suffix range, as in Range: bytes=-3000, which is the most frequent case in getbinpkg.py. Squid randomly gets the whole file and sends to the client, sometimes, this caused my first patch to crash with MemoryError when trying to get metadata from large packages such as OpenOffice.
Patch looks good. One question though; what's the "Do not send user/password here" about?
Created attachment 72451 [details, diff] The corrected proposed patch... The "Do not send password here" is for not sending the password as a URL. This is because it goes in a header and encoded. But it should be as this one I'm sending now, and not with the line that do this commented out. :) Now I think it's ok.
Is this fixed in the recent stable portage version? If so, this bug can be closed =)
This looks like it may be a duplicate of bug 438640. Please re-open if it's still an issue.