1. Michał Górny
  2. smart-live-rebuild
  3. Issues
Issue #3 resolved

s-l-r does not pass along http_proxy and https_proxy values for git

Anonymous created an issue

I like s-l-r very much, but I have a problem using it behind a proxy firewall. Any repository served up by git always fails with a non-zero return value because the repository is unreachable. This is because the proxy settings are not passed along. If I modify the git_2.py code to declare http_proxy and https_proxy on the command line, then everything works as expected.

Comments (7)

  1. Michał Górny repo owner

    Hmm, yes, that's true since we're cleaning up the environment completely before calling VCS-es. I'll change it to pass on http_proxy and https_proxy. Can you maybe think of any other environment variables which should be preserved as well?

  2. Joel Berendzen

    I'm never sure which VCS's use which environmental variables related to proxies. My list has http_proxy https_proxy HTTP_PROXY HTTPS_PROXY PROXY_HOST PROXY_PORT NO_PROXY and ANT_OPTS but there are still some tools that ebuilds call such as maven that have variables not in this list. Moreover portage has its own set of environmental variables that users could set and sometimes do.

    Why not pass along everything in the environment?

  3. Michał Górny repo owner

    Well, first of all, unless I did something horribly wrong or missing some point here, ANT_OPTS shouldn't be relevant at all. The environment cleanup applies only to spawned VCS processes, and not the overall program environment.

    If I recall correctly, the main reason for introducing the cleanup was that some VCS-es were influenced by the locale and some variables specifying configuration file locations. Cleaning up the environment was the simplest way of ensuring that VCS-es didn't do any unexpected output or behavior.

  4. Joel Berendzen

    Oh, so the full environment gets passed along to the emerge, just not to the VCS? Then you can ignore what I wrote about ANT_OPTS and maven, which are only needed at emerge time. The live builds I use that employ these, by the way, are sci-biology/artemis and sci-biology/gatk, out of 36 live packages I regularly use. The only VCS's used in my installed tree are git (21) and svn (15). SVN seems to save the proxy info at creation time, so it's only the https gits that broke for me.

  5. Log in to comment