From d516b9decad07b940b3cd117fc4e353dd8bbe7d2 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 24 Aug 2022 10:47:33 +0200 Subject: make repo packages (mappings) load as uninstalled; make them installable through the web UI --- .../proxy/state_impl/_operations/prune_packages.py | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/hydrilla/proxy/state_impl/_operations/prune_packages.py') diff --git a/src/hydrilla/proxy/state_impl/_operations/prune_packages.py b/src/hydrilla/proxy/state_impl/_operations/prune_packages.py index eb0539c..6f4b3e7 100644 --- a/src/hydrilla/proxy/state_impl/_operations/prune_packages.py +++ b/src/hydrilla/proxy/state_impl/_operations/prune_packages.py @@ -137,28 +137,8 @@ WHERE def prune_packages(cursor: sqlite3.Cursor) -> None: assert cursor.connection.in_transaction - print('VERSIONS TO DELETE', cursor.execute(''' -SELECT - iv.item_version_id - FROM - item_versions AS iv - JOIN orphan_iterations AS oi USING (repo_iteration_id) - WHERE - iv.installed != 'I'; -''').fetchall()) for sql in _remove_item_versions_sqls: cursor.execute(sql) - print('ITEMS TO DELETE', cursor.execute(''' -SELECT - i.item_id - FROM - items AS i - LEFT JOIN item_versions AS iv USING (item_id) - LEFT JOIN mapping_statuses AS ms USING (item_id) - WHERE - iv.item_version_id IS NULL AND - (i.type = 'R' OR ms.enabled = 'N'); -''').fetchall()) cursor.execute(_remove_items_sql) cursor.execute(_remove_files_sql) cursor.execute(_remove_repo_iterations_sql) -- cgit v1.2.3