Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 587990 - sys-apps/portage-2.2.28: emerge dropping http_proxy variable
Summary: sys-apps/portage-2.2.28: emerge dropping http_proxy variable
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 912589
  Show dependency tree
 
Reported: 2016-07-04 14:16 UTC by Aidan Taniane
Modified: 2023-08-19 14:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aidan Taniane 2016-07-04 14:16:25 UTC
As above, portage is filtering out the http_proxy variable, passed by either env or make.conf.  As seen here:

desktop ~ # http_proxy="http://localhost:8080/" emerge --info | grep proxy | wc -l
0
desktop ~ # 

Reproducible: Always

Steps to Reproduce:
1.Set http_proxy variable
2.Fetch package
Actual Results:  
Emerge has wget fetch directly.

Expected Results:  
Emerge should have passed wget the http_proxy variable.

This can be a major blocker for network environments that have a locked down gateway.
Comment 1 Mike Gilbert gentoo-dev 2016-07-04 16:43:03 UTC
It seems to work fine for me. Make sure you set both http_proxy and https_proxy.

emerge --info does not print all environment variables, so that is not a valid test case.


floppym@naomi portage % python3.5 ./bin/emerge --version     
Portage 2.2.28 (python 3.5.1-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.4.0, glibc-2.23-r2, 4.5.4 x86_64)

floppym@naomi portage % https_proxy=http://localhost:80/ GENTOO_MIRRORS= python3.5 ./bin/emerge --fetchonly -O -j1 chromium

>>> Fetching (1 of 1) www-client/chromium-53.0.2774.3::gentoo
>>> Resuming download...
>>> Downloading 'https://commondatastorage.googleapis.com/chromium-browser-official/chromium-53.0.2774.3.tar.xz'
--2016-07-04 12:39:41--  https://commondatastorage.googleapis.com/chromium-browser-official/chromium-53.0.2774.3.tar.xz
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:80... failed: Connection refused.
!!! Couldn't download 'chromium-53.0.2774.3.tar.xz'. Aborting.
 * Fetch failed for 'www-client/chromium-53.0.2774.3'

>>> Failed to emerge www-client/chromium-53.0.2774.3
Comment 2 Aidan Taniane 2016-07-04 17:04:32 UTC
(In reply to Mike Gilbert from comment #1)
> It seems to work fine for me. Make sure you set both http_proxy and
> https_proxy.
That fixed it.  There was no mention of the https_proxy variable in the make.conf man page.  It'd be worth putting in there, and/or using https_proxy="${http_proxy}" as a default, since http proxies tend to also proxy https.

> emerge --info does not print all environment variables, so that is not a
> valid test case.
I can understand system environment variables to not show, but it seems relevant for make.conf variables to be listed.  Hence the confusion.  Anyway, thanks for the feedback.
Comment 3 Zac Medico gentoo-dev 2016-07-04 18:10:36 UTC
(In reply to Aidan Taniane from comment #2)
> (In reply to Mike Gilbert from comment #1)
> > It seems to work fine for me. Make sure you set both http_proxy and
> > https_proxy.
> That fixed it.  There was no mention of the https_proxy variable in the
> make.conf man page.  It'd be worth putting in there, and/or using
> https_proxy="${http_proxy}" as a default, since http proxies tend to also
> proxy https.

We can handle that as part of bug 587484.

(In reply to Aidan Taniane from comment #2)
> > emerge --info does not print all environment variables, so that is not a
> > valid test case.
> I can understand system environment variables to not show, but it seems
> relevant for make.conf variables to be listed.  Hence the confusion. 
> Anyway, thanks for the feedback.

You can use the --verbose option to make it show all variables. It's possible that there could be privacy issues involved with showing all make.conf variables by default.