From d9c6fb6767c6873782847df168f8224d83ab30cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Fri, 14 Aug 2009 22:50:33 +0200 Subject: Rewrote eix-parser in Cython --> WAAAAAAAAAY faster --- portato/db/eix_sql.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'portato/db') diff --git a/portato/db/eix_sql.py b/portato/db/eix_sql.py index 089d3ed..3a0c6e9 100644 --- a/portato/db/eix_sql.py +++ b/portato/db/eix_sql.py @@ -56,9 +56,10 @@ class EixSQLDatabase (SQLDatabase): def _get(): with EixReader(self.cache) as eix: for cat in eix.categories: - if category is None or cat.name() == category: - for pkg in cat.packages(): - yield (cat.name(), pkg.name(), pkg.name() in inst, False) + if category is None or cat.name == category: + for pkg in cat.packages: + p = "%s/%s" % (cat.name, pkg.name) + yield (cat.name, pkg.name, p in inst, False) connection.executemany("INSERT INTO packages (cat, name, inst, disabled) VALUES (?, ?, ?, ?)", _get()) connection.commit() -- cgit v1.2.3