diff options
Diffstat (limited to 'src/hydrilla/proxy/state_impl/repos.py')
-rw-r--r-- | src/hydrilla/proxy/state_impl/repos.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/hydrilla/proxy/state_impl/repos.py b/src/hydrilla/proxy/state_impl/repos.py index 346e113..838698c 100644 --- a/src/hydrilla/proxy/state_impl/repos.py +++ b/src/hydrilla/proxy/state_impl/repos.py @@ -51,7 +51,6 @@ from ... import versions from .. import state as st from .. import simple_dependency_satisfying as sds from . import base -from . import _operations repo_name_regex = re.compile(r''' @@ -194,8 +193,6 @@ class ConcreteRepoRef(st.RepoRef): (self.id,) ) - _operations.prune_packages(cursor) - # For mappings explicitly enabled by the user (+ all mappings they # recursively depend on) let's make sure that their exact same # versions will be enabled after the change. @@ -217,7 +214,7 @@ class ConcreteRepoRef(st.RepoRef): req = sds.MappingVersionRequirement(info.identifier, info) requirements.append(req) - self.state.recompute_dependencies(requirements) + self.state.recompute_dependencies(requirements, prune_orphans=True) def update( self, @@ -260,7 +257,7 @@ class ConcreteRepoRef(st.RepoRef): self.state.recompute_dependencies() - def refresh(self) -> st.RepoIterationRef: + def refresh(self) -> None: with self.state.cursor(transaction=True) as cursor: ensure_repo_not_deleted(cursor, self.id) @@ -274,15 +271,7 @@ class ConcreteRepoRef(st.RepoRef): with tempfile.TemporaryDirectory() as tmpdir_str: tmpdir = Path(tmpdir_str) sync_remote_repo_definitions(repo_url, tmpdir) - new_iteration_id = _operations._load_packages_no_state_update( - cursor = cursor, - malcontent_path = tmpdir, - repo_id = int(self.id) - ) - - self.state.rebuild_structures() - - return ConcreteRepoIterationRef(str(new_iteration_id), self.state) + self.state.import_items(tmpdir, int(self.id)) def get_display_info(self) -> st.RepoDisplayInfo: with self.state.cursor() as cursor: |