From a376cafe07b319d0e7f71a7cdc4583eececa9561 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 29 Jun 2017 15:23:07 +0100 Subject: populate each category with at least 2 apps --- src/frontend/gui/system.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/frontend/gui/system.py') diff --git a/src/frontend/gui/system.py b/src/frontend/gui/system.py index f8cc428..d3ccbe9 100755 --- a/src/frontend/gui/system.py +++ b/src/frontend/gui/system.py @@ -37,7 +37,21 @@ class System(QtWidgets.QMainWindow): def load_packages(self): with sqlite3.connect('/var/lib/sisyphus/db/sisyphus.db') as db: cursor=db.cursor() - cursor.execute('''SELECT * from remote_packages''') + cursor.execute('''SELECT + a.category AS cat, + a.name AS pn, + a.version AS av, + i.version AS iv, + a.description AS descr + FROM remote_packages AS a + LEFT JOIN local_packages AS i + ON a.category = i.category + AND a.name = i.name + AND a.slot = i.slot + WHERE a.name IN + ('aqemu', + 'virtualbox') + ''') rows = cursor.fetchall() for row in rows: -- cgit v1.2.3