From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jookia <166291@gmail.com> Subject: Re: [PATCH 1/2] svn-download: Respect current-http-proxy when downloading. Date: Thu, 3 Mar 2016 15:32:05 +1100 Message-ID: <20160303043205.GA28472@novena-choice-citizen.lan> References: <56c321a5.8445620a.d0d47.3c13@mx.google.com> <871t7wwzrx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <166291@gmail.com>) id 1abKwa-0003wg-5f for guix-devel@gnu.org; Wed, 02 Mar 2016 23:32:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <166291@gmail.com>) id 1abKwZ-0007X3-CE for guix-devel@gnu.org; Wed, 02 Mar 2016 23:32:56 -0500 Content-Disposition: inline In-Reply-To: <871t7wwzrx.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org On Sun, Feb 28, 2016 at 05:44:18PM +0100, Ludovic Courtès wrote: > > + (define proxy-config > > + (if (current-http-proxy) > > + (and-let* ((proxy-uri (string->uri (current-http-proxy))) > > + (proxy-host (uri-host proxy-uri)) > > + (proxy-port (number->string (uri-port proxy-uri))) > > + (config-host "servers:global:http-proxy-host=") > > + (config-port "servers:global:http-proxy-port=")) > > + `("--config-option" ,(string-append config-host proxy-host) > > + "--config-option" ,(string-append config-port proxy-port))) > > + '())) > > I would suggest using an explicit (getenv "http_proxy") instead of > (current-http-proxy) since the latter is specific to the (web …) > modules, which are not involved here. Sorry for the reply, now that I have an RFC for the coreboot patches I've looked back at this. The URI module is also in the web module, and I'm not sure how I feel about rewriting a URI parser to get the host and port out of http_proxy. > Thanks! > > Ludo’. Thoughts? Jookia.