There is no need for layman to need the proxy to be defined in layman.cfg - it's just another file that laptop users have to edit if they move around.
Portage already has a mechanism for defining proxies - in make.conf. Layman should read proxy information from there.
I'm not sure if everyone would agree to it. What if someone wants different proxy config for layman than portage? Also, isn't proxy information something that you have to set up at many different places anyway? What about your browser for instance?
(In reply to comment #1)
> I'm not sure if everyone would agree to it. What if someone wants different
> proxy config for layman than portage?
Can you describe a situation where this would be the case? I can't think of any. If you feel strongly that people may want this,
import_proxy_from_make.conf=True or something could be an option. I still can't think why though.
> Also, isn't proxy information something
> that you have to set up at many different places anyway? What about your
> browser for instance?
It is, but "it's the status quo" isn't a great reason not to improve things. I get hit by proxy changing twice a week, moving my laptop around. There's a list of files, including my browser settings which must be changed each time I change location. Cutting that list down by even a single file would be a good thing (even beyond this, the source control tools that layman calls also need proxy info set in config files, I think git is the only one which honours environment variables).
Ideally, programs would read $HTTP_PROXY, which I can set/unset as neccessary, but I really think that as layman is a portage tool, it should be aware of system settings set for portage.
(In reply to comment #2)
> import_proxy_from_make.conf=True or something could be an option.
I like that idea, but ...
I'm quite busy and my heart doesn't really beat for proxy support. Any chance you could make a patch for me?
What is the recommended way for specifying proxy settings?..
The bug #28094 (wontfix) says (HTTP_PROXY != http_proxy) which is even more confusing.
I agree, it's not logical changing layman.cfg, wgetrc, make.conf if you just switched to another network. In the same time it must be way to overwrite global setting if necessary.
So how about using config settings as high priority and (if it is not set) $http_proxy as a second?
P.S. I like the way how chrome specified $HTTP variables:
Wow, normally I only need to change the http_proxy environment variable when changing networks. Everything derives from it.
From my point of view, Layman honors the environment variable http_proxy already, if the "proxy" option in layman.cfg is _not_ set. You will need to set this environment variable for Portage anyway without the need for any additional config variables in make.conf, since Portage uses wget (by default) which honors that variable, too. Does that work for you?
If that works, maybe there should at least be a clarifying comment in layman.cfg.
Can you re-summarize what you want me to do? I'm a bit lost.
(In reply to comment #6)
> Can you re-summarize what you want me to do? I'm a bit lost.
I had a go at implementing a change as I described in the original report, and discovered that comment #5 is right - layman honours the http_proxy environment variable. (unless otherwise specified in layman.cfg)
If this were made clear in the default layman.cfg file, I think that that would be enough.
# Proxy support
# If unset, layman will ues the http_proxy environment variable.
#proxy : http://[user:pass@]www.my-proxy.org:3128
(In reply to comment #7)
> If this were made clear in the default layman.cfg file, I think that that would
> be enough.
> # Proxy support
> # If unset, layman will ues the http_proxy environment variable.
> #proxy : http://[user:pass@]www.my-proxy.org:3128
Now fixed as suggested, closing.