From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dbapi/
Date: Thu, 12 May 2011 05:24:52 +0000 (UTC) [thread overview]
Message-ID: <d53dfac16cfc793b7f55069bfa49c3544a73bd2a.zmedico@gentoo> (raw)
commit: d53dfac16cfc793b7f55069bfa49c3544a73bd2a
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue May 10 05:05:40 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 12 05:19:53 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d53dfac1
get_counter_tick_core: use cpv_all
It's more efficient to use cpv_all since cp_all calls cpv_all anyway,
and calls to cp_list induce additional stat calls.
---
pym/portage/dbapi/vartree.py | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index a129973..a54adc0 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -755,16 +755,14 @@ class vardbapi(dbapi):
# to newly installed packages having lower
# COUNTERs than the previous version in the
# same slot.
- cp_list = self.cp_list
max_counter = counter
- for cp in self.cp_all():
- for cpv in cp_list(cp):
- try:
- pkg_counter = int(self.aux_get(cpv, ["COUNTER"])[0])
- except (KeyError, OverflowError, ValueError):
- continue
- if pkg_counter > max_counter:
- max_counter = pkg_counter
+ for cpv in self.cpv_all():
+ try:
+ pkg_counter = int(self.aux_get(cpv, ["COUNTER"])[0])
+ except (KeyError, OverflowError, ValueError):
+ continue
+ if pkg_counter > max_counter:
+ max_counter = pkg_counter
if counter < 0 and not new_vdb:
writemsg(_("!!! Initializing COUNTER to " \
next reply other threads:[~2011-05-12 5:26 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-12 5:24 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-27 2:56 [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dbapi/ Zac Medico
2011-05-27 2:16 Zac Medico
2011-05-27 0:05 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-26 6:18 Zac Medico
2011-05-12 20:13 Zac Medico
2011-05-12 17:58 Zac Medico
2011-05-12 7:13 Zac Medico
2011-05-12 5:47 Zac Medico
2011-05-12 5:47 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-12 5:24 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-08 20:50 Zac Medico
2011-05-04 20:03 Zac Medico
2011-03-27 21:00 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-01 21:54 Zac Medico
2011-03-01 21:06 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-03-01 20:55 Zac Medico
2011-02-14 4:31 Zac Medico
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=d53dfac16cfc793b7f55069bfa49c3544a73bd2a.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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