aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state_impl/concrete_state.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-25 16:37:53 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 12:54:54 +0200
commit367ea85057368047a50ae98a3510e0113eadd744 (patch)
tree5aecfd3a2e44377e9d331ca77346666ca193006c /src/hydrilla/proxy/state_impl/concrete_state.py
parentc1f6a379b3a85303f487e1b366e96d9db90cd4e3 (diff)
downloadhaketilo-hydrilla-367ea85057368047a50ae98a3510e0113eadd744.tar.gz
haketilo-hydrilla-367ea85057368047a50ae98a3510e0113eadd744.zip
[proxy] make it possible to uninstall a package
This commit also brings some more refactoring under state_impl/.
Diffstat (limited to 'src/hydrilla/proxy/state_impl/concrete_state.py')
-rw-r--r--src/hydrilla/proxy/state_impl/concrete_state.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/hydrilla/proxy/state_impl/concrete_state.py b/src/hydrilla/proxy/state_impl/concrete_state.py
index 0de67e0..f180ec6 100644
--- a/src/hydrilla/proxy/state_impl/concrete_state.py
+++ b/src/hydrilla/proxy/state_impl/concrete_state.py
@@ -140,20 +140,22 @@ class ConcreteHaketiloState(base.HaketiloStateWithFields):
self.rebuild_structures()
+ def prune_orphans(self) -> None:
+ with self.cursor() as cursor:
+ assert self.connection.in_transaction
+
+ _operations.prune_orphans(cursor)
+
def recompute_dependencies(
self,
- extra_requirements: t.Iterable[sds.MappingRequirement] = [],
- prune_orphans: bool = False,
+ unlocked_required_mappings: base.NoLockArg = []
) -> None:
with self.cursor() as cursor:
assert self.connection.in_transaction
- if prune_orphans:
- _operations.prune_packages(cursor)
-
_operations._recompute_dependencies_no_state_update(
- cursor = cursor,
- extra_requirements = extra_requirements
+ cursor = cursor,
+ unlocked_required_mappings = unlocked_required_mappings
)
self.rebuild_structures()