summaryrefslogtreecommitdiff
path: root/portato/db/eix_sql.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 22:50:33 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-08-14 22:50:33 +0200
commitd9c6fb6767c6873782847df168f8224d83ab30cd (patch)
tree9661e780ae928619210159ff7933f4194f04ac25 /portato/db/eix_sql.py
parent2a945321cbc54c6acae73bc25d543e2af6f3e42b (diff)
downloadportato-d9c6fb6767c6873782847df168f8224d83ab30cd.tar.gz
portato-d9c6fb6767c6873782847df168f8224d83ab30cd.tar.bz2
portato-d9c6fb6767c6873782847df168f8224d83ab30cd.zip
Rewrote eix-parser in Cython --> WAAAAAAAAAY faster
Diffstat (limited to 'portato/db/eix_sql.py')
-rw-r--r--portato/db/eix_sql.py7
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()
e75491b836c7fc12b617da5d68288&follow=1'>Issue #46: Fix semantics of `n` resultRené 'Necoro' Neumann2-9/+15 2021-02-16Issue #46: Move and rename writer; add commentsRené 'Necoro' Neumann3-12/+21 2021-02-15Issue #46: Improvements; add testsRené 'Necoro' Neumann2-1/+48 2021-02-15Bump github.com/google/uuid from 1.1.4 to 1.2.0dependabot[bot]2-3/+3 2021-02-15Issue #46: Make the resulting email body not to include single \r or \n. This...René 'Necoro' Neumann2-2/+66 2021-01-20Bump github.com/PuerkitoBio/goquery from 1.6.0 to 1.6.1dependabot[bot]2-3/+3 2021-01-09Bump github.com/google/uuid from 1.1.2 to 1.1.4dependabot[bot]2-3/+3 2021-01-09Bump github.com/emersion/go-message from 0.14.0 to 0.14.1 (#42)dependabot[bot]2-3/+3 2020-11-28Bump github.com/emersion/go-message from 0.13.0 to 0.14.0 (#38)dependabot[bot]2-3/+9 2020-11-28Bump github.com/google/go-cmp from 0.5.2 to 0.5.4 (#37)dependabot[bot]2-3/+3 2020-11-23Fix release.ymlv0.5.2René 'Necoro' Neumann1-3/+10 2020-11-23Prepare v0.5.2René 'Necoro' Neumann3-3/+8 2020-11-20Bump github.com/gabriel-vasile/mimetype from 1.1.1 to 1.1.2dependabot[bot]2-3/+3 2020-11-04Clean dependabot.ymlRené 'Necoro' Neumann1-4/+0