diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-08-14 22:50:33 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-08-14 22:50:33 +0200 |
commit | d9c6fb6767c6873782847df168f8224d83ab30cd (patch) | |
tree | 9661e780ae928619210159ff7933f4194f04ac25 /portato/db | |
parent | 2a945321cbc54c6acae73bc25d543e2af6f3e42b (diff) | |
download | portato-d9c6fb6767c6873782847df168f8224d83ab30cd.tar.gz portato-d9c6fb6767c6873782847df168f8224d83ab30cd.tar.bz2 portato-d9c6fb6767c6873782847df168f8224d83ab30cd.zip |
Rewrote eix-parser in Cython --> WAAAAAAAAAY faster
Diffstat (limited to '')
-rw-r--r-- | portato/db/eix_sql.py | 7 |
1 files changed, 4 insertions, 3 deletions
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() |