summaryrefslogtreecommitdiff
path: root/portato/db/eix_sql.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-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()