From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org, Mark Kubacki <wmark@hurrikane.de>
Subject: Re: [gentoo-portage-dev] [PATCH 2/3] Send output of ```emerge --version``` as User-Agent HTTP-header
Date: Wed, 14 Aug 2013 23:25:52 -0700 [thread overview]
Message-ID: <520C7470.9070605@gentoo.org> (raw)
In-Reply-To: <1376511040-15874-3-git-send-email-wmark@hurrikane.de>
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
next prev parent reply other threads:[~2013-08-15 6:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 20:10 [gentoo-portage-dev] [PATCH 0/3] Implement a more verbose User-Agent HTTP-header Mark Kubacki
2013-08-14 20:10 ` [gentoo-portage-dev] [PATCH 1/3] Send exact version with " Mark Kubacki
2013-08-14 20:10 ` [gentoo-portage-dev] [PATCH 2/3] Send output of ```emerge --version``` as " Mark Kubacki
2013-08-15 6:25 ` Zac Medico [this message]
2013-08-14 20:10 ` [gentoo-portage-dev] [PATCH 3/3] Add CPU model name to output of getportageversion as fifth element Mark Kubacki
2013-08-14 20:27 ` [gentoo-portage-dev] " Mark Kubacki
2013-08-15 8:00 ` [gentoo-portage-dev] " Fabian Groffen
2013-08-24 22:39 ` Mike Frysinger
2013-08-15 10:58 ` Alexander Berntsen
2013-08-24 22:38 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=520C7470.9070605@gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
--cc=wmark@hurrikane.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox