From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BC3F01381F3 for ; Thu, 15 Aug 2013 06:25:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 12444E0AFF; Thu, 15 Aug 2013 06:25:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7BF31E0A8E for ; Thu, 15 Aug 2013 06:25:54 +0000 (UTC) Received: from [192.168.26.5] (ip98-164-195-43.oc.oc.cox.net [98.164.195.43]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id A395033EB4B; Thu, 15 Aug 2013 06:25:53 +0000 (UTC) Message-ID: <520C7470.9070605@gentoo.org> Date: Wed, 14 Aug 2013 23:25:52 -0700 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org, Mark Kubacki Subject: Re: [gentoo-portage-dev] [PATCH 2/3] Send output of ```emerge --version``` as User-Agent HTTP-header References: <1376511040-15874-1-git-send-email-wmark@hurrikane.de> <1376511040-15874-3-git-send-email-wmark@hurrikane.de> In-Reply-To: <1376511040-15874-3-git-send-email-wmark@hurrikane.de> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: a52385dd-c7f5-4206-ba4e-7796d015cfe1 X-Archives-Hash: 315795f599cf4778aea5908f7f081894 On 08/14/2013 01:10 PM, Mark Kubacki wrote: > @@ -892,8 +893,13 @@ class binarytree(object): > # Don't use urlopen for https, since it doesn't support > # certificate/hostname verification (bug #469888). > if parsed_url.scheme not in ('https',): > + trees = load_emerge_config().trees > + user_agent = "Gentoo "+getportageversion(self.settings["PORTDIR"], None, > + self.settings.profile_path, self.settings["CHOST"], > + trees[self.settings['EROOT']]["vartree"].dbapi) Generally, your patches look reasonable. However, it's a waste to call load_emerge_config() here, since the caller has certainly loaded the config already. I guess we could have the caller pass the result of getportageversion() as an argument to the binarytree.populate() method. -- Thanks, Zac