aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state_impl/_operations/prune_packages.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/state_impl/_operations/prune_packages.py')
-rw-r--r--src/hydrilla/proxy/state_impl/_operations/prune_packages.py20
1 files changed, 0 insertions, 20 deletions
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)