From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 5D4DCE00DC9; Tue, 5 Jul 2016 08:51:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.173 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2D03BE00D8F for ; Tue, 5 Jul 2016 08:51:46 -0700 (PDT) Received: by mail-pf0-f173.google.com with SMTP id i123so71208525pfg.0 for ; Tue, 05 Jul 2016 08:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=zNiA0LOhXC5DVPYOjtLQ4G5/KXi+0nrxTudB8WdpoPo=; b=X9mTenK2iACcXk64sWHIrAR8DFhb9yiy9uNYRS/hnUtPEh69sl+mGebNReDzoG3W2k OglpT/ndJhERCX2F5/LsmsFDOU9+sduMe38XORB868RTY3lCkhb+BmPhJ4n6uEdi3SOt noEga9Vb28b01jP3q7poo7hNogqXWgnVNdIpp+D64agFyCMwRGMq7myCcs/kw4Vrgfim aokxISsq0q6Mky9J4+lOlEB4J5adYpKDmAAnQpzfhVskhS7dUR6B69AGppcCeyycgrNx jecQnEHI2u24Fd0hCYtLdIKHM3yucbsYHtMfqN6ySgtj9YCGGgtKHgTiO+LmwNGY7jJ0 3Wlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=zNiA0LOhXC5DVPYOjtLQ4G5/KXi+0nrxTudB8WdpoPo=; b=QP8Dk0M1rrj4kbgNeIscw7kXcZ1d8XAU+/jljKwfGr/04gNanRSokckkcc0gV++ixI ZfgUXwQM8DUl6U7K/4IGo1u2gzewk03WPIhLBWs3nNisWo705vYt9WH1BrUk98cTe1U0 kUyTaFr0BtuffeIt1ld2QcLXyyoAy4Lq1NIYzlzfj2o35ygTbqlAa2ne8nf1Fu89jY2g d3NYwVSAOb5Dn3BDchli4/nyRVBuQB9/H9+x2DbLclLLq1hq/keYLbZMZsu9ve6PAO/R b4ywtWi6kYYkN6g2jy7Tu+/bWlDBDEU30tO06Q/eZ2dHWg937P68adPdqGRpyK5EfqAf lrTQ== X-Gm-Message-State: ALyK8tIlNQgqxTF66pPaTfUHYWrtparY8DWg8QXEHyxLy5pVP2RkqQAyDuR/cOGLmgP0JcUA X-Received: by 10.98.206.77 with SMTP id y74mr33616764pfg.55.1467733905740; Tue, 05 Jul 2016 08:51:45 -0700 (PDT) Received: from [192.168.0.78] (host86-169-85-169.range86-169.btcentralplus.com. [86.169.85.169]) by smtp.googlemail.com with ESMTPSA id 4sm6102081pfi.24.2016.07.05.08.51.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jul 2016 08:51:45 -0700 (PDT) To: toaster@yoctoproject.org References: <1467282072-10881-1-git-send-email-elliot.smith@intel.com> From: Michael Wood Message-ID: <577BD78F.5050900@intel.com> Date: Tue, 5 Jul 2016 16:51:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1467282072-10881-1-git-send-email-elliot.smith@intel.com> Subject: Re: [PATCH] toaster: show https proxy in error output X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 15:51:52 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit For the benefit of the mailing list - Suggested we hold this off until it can be rebased on the database clean up branch Michael On 30/06/16 11:21, Elliot Smith wrote: > urllib2 automatically uses any http_proxy and https_proxy > settings from the environment. Now that the layer index is > available over https, there is a possibility that a user > may experience an error while fetching the layer index via > HTTPS. In this situation, show the https_proxy setting as > well as the http_proxy setting in the error. > > [YOCTO #9439] > > Signed-off-by: Elliot Smith > --- > bitbake/lib/toaster/orm/models.py | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py > index 61737c7..8f5e0f5 100644 > --- a/bitbake/lib/toaster/orm/models.py > +++ b/bitbake/lib/toaster/orm/models.py > @@ -1196,7 +1196,11 @@ class LayerIndexLayerSource(LayerSource): > from urllib2 import urlopen, URLError > from urlparse import urlparse > > - proxy_settings = os.environ.get("http_proxy", None) > + proxy_settings = ( > + os.environ.get("http_proxy"), > + os.environ.get("https_proxy") > + ) > + > oe_core_layer = 'openembedded-core' > > def _get_json_response(apiurl = self.apiurl): > @@ -1215,8 +1219,7 @@ class LayerIndexLayerSource(LayerSource): > apilinks = _get_json_response() > except Exception as e: > import traceback > - if proxy_settings is not None: > - logger.info("EE: Using proxy %s" % proxy_settings) > + logger.info("EE: Using HTTP proxy %s and HTTPS proxy %s" % proxy_settings) > logger.warning("EE: could not connect to %s, skipping update: %s\n%s" % (self.apiurl, e, traceback.format_exc())) > return >