public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, bin/
Date: Sat, 15 Oct 2011 18:38:46 +0000 (UTC)	[thread overview]
Message-ID: <f4807e05962845c17d689b8bb80a1f55b85834c9.zmedico@gentoo> (raw)

commit:     f4807e05962845c17d689b8bb80a1f55b85834c9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 15 18:38:35 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Oct 15 18:38:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f4807e05

frozenset categories optimize pordbapi.cp_list()

---
 bin/repoman                          |    6 +++---
 pym/portage/package/ebuild/config.py |    6 ++++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 2a6d782..b80b783 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -680,9 +680,9 @@ categories = []
 for path in set([portdir, repodir]):
 	categories.extend(portage.util.grabfile(
 		os.path.join(path, 'profiles', 'categories')))
-repoman_settings.categories = tuple(sorted(
-	portage.util.stack_lists([categories], incremental=1)))
-categories = frozenset(repoman_settings.categories)
+repoman_settings.categories = frozenset(
+	portage.util.stack_lists([categories], incremental=1))
+categories = repoman_settings.categories
 
 portdb.settings = repoman_settings
 root_config = RootConfig(repoman_settings, trees[root], None)

diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 37dcbb4..a80c82d 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -606,9 +606,11 @@ class config(object):
 			self.categories = [grabfile(os.path.join(x, "categories")) \
 				for x in locations_manager.profile_and_user_locations]
 			category_re = dbapi._category_re
-			self.categories = tuple(sorted(
+			# categories used to be a tuple, but now we use a frozenset
+			# for hashed category validation in pordbapi.cp_list()
+			self.categories = frozenset(
 				x for x in stack_lists(self.categories, incremental=1)
-				if category_re.match(x) is not None))
+				if category_re.match(x) is not None)
 
 			archlist = [grabfile(os.path.join(x, "arch.list")) \
 				for x in locations_manager.profile_and_user_locations]



             reply	other threads:[~2011-10-15 18:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-15 18:38 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-02-05 19:25 [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/, bin/ Michał Górny
2013-07-16 17:52 Arfrever Frehtes Taifersar Arahesis
2013-01-15 20:52 Zac Medico
2012-09-18  2:59 Zac Medico
2012-09-14  7:26 Zac Medico
2012-09-13 18:25 Zac Medico
2012-04-22 17:56 Zac Medico
2011-11-10  3:12 Zac Medico
2011-11-09  0:21 Zac Medico
2011-11-05 18:53 Zac Medico
2011-09-22  0:05 Zac Medico
2011-08-28 23:32 Zac Medico
2011-05-07 22:00 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=f4807e05962845c17d689b8bb80a1f55b85834c9.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