summaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state_impl/repos.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-08-25 10:18:33 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 12:54:53 +0200
commitedbb8286146920583087080809f6e904ca856cc9 (patch)
tree0a7b3bf4c207707a211e66c45bafec7fab579e07 /src/hydrilla/proxy/state_impl/repos.py
parentf1204084f5fd377e66f15b3f23e81e13a063512e (diff)
downloadhaketilo-hydrilla-edbb8286146920583087080809f6e904ca856cc9.tar.gz
haketilo-hydrilla-edbb8286146920583087080809f6e904ca856cc9.zip
[proxy] make package version info page also display other versions; fix&improve some aspects of package loading and dependency recomputing
Diffstat (limited to 'src/hydrilla/proxy/state_impl/repos.py')
-rw-r--r--src/hydrilla/proxy/state_impl/repos.py30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/hydrilla/proxy/state_impl/repos.py b/src/hydrilla/proxy/state_impl/repos.py
index d4fbbce..346e113 100644
--- a/src/hydrilla/proxy/state_impl/repos.py
+++ b/src/hydrilla/proxy/state_impl/repos.py
@@ -202,17 +202,11 @@ class ConcreteRepoRef(st.RepoRef):
cursor.execute(
'''
SELECT
- iv.definition, r.name, ri.iteration
+ definition, repo, repo_iteration
FROM
- mapping_statuses AS ms
- JOIN item_versions AS iv
- ON ms.active_version_id = iv.item_version_id
- JOIN repo_iterations AS ri
- USING (repo_iteration_id)
- JOIN repos AS r
- USING (repo_id)
+ item_versions_extra
WHERE
- ms.required
+ active = 'R';
'''
)
@@ -288,18 +282,6 @@ class ConcreteRepoRef(st.RepoRef):
self.state.rebuild_structures()
- cursor.execute(
- '''
- UPDATE
- repos
- SET
- last_refreshed = STRFTIME('%s', 'NOW')
- WHERE
- repo_id = ?;
- ''',
- (self.id,)
- )
-
return ConcreteRepoIterationRef(str(new_iteration_id), self.state)
def get_display_info(self) -> st.RepoDisplayInfo:
@@ -332,7 +314,7 @@ class ConcreteRepoStore(st.RepoStore):
state: base.HaketiloStateWithFields
def get(self, id: str) -> st.RepoRef:
- return ConcreteRepoRef(id, self.state)
+ return ConcreteRepoRef(str(int(id)), self.state)
def add(self, name: str, url: str) -> st.RepoRef:
name = name.strip()
@@ -360,8 +342,8 @@ class ConcreteRepoStore(st.RepoStore):
cursor.execute(
'''
- INSERT INTO repos(name, url, deleted, next_iteration)
- VALUES (?, ?, FALSE, 1)
+ INSERT INTO repos(name, url)
+ VALUES (?, ?)
ON CONFLICT (name)
DO UPDATE SET
name = excluded.name,