aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state_impl/repos.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/state_impl/repos.py')
-rw-r--r--src/hydrilla/proxy/state_impl/repos.py26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/hydrilla/proxy/state_impl/repos.py b/src/hydrilla/proxy/state_impl/repos.py
index 838698c..8a3fe64 100644
--- a/src/hydrilla/proxy/state_impl/repos.py
+++ b/src/hydrilla/proxy/state_impl/repos.py
@@ -193,28 +193,8 @@ class ConcreteRepoRef(st.RepoRef):
(self.id,)
)
- # 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.
- cursor.execute(
- '''
- SELECT
- definition, repo, repo_iteration
- FROM
- item_versions_extra
- WHERE
- active = 'R';
- '''
- )
-
- requirements = []
-
- for definition, repo, iteration in cursor.fetchall():
- info = item_infos.MappingInfo.load(definition, repo, iteration)
- req = sds.MappingVersionRequirement(info.identifier, info)
- requirements.append(req)
-
- self.state.recompute_dependencies(requirements, prune_orphans=True)
+ self.state.prune_orphans()
+ self.state.recompute_dependencies()
def update(
self,
@@ -255,7 +235,7 @@ class ConcreteRepoRef(st.RepoRef):
except sqlite3.IntegrityError:
raise st.RepoNameTaken()
- self.state.recompute_dependencies()
+ self.state.rebuild_structures()
def refresh(self) -> None:
with self.state.cursor(transaction=True) as cursor: