Skip to content

Commit

Permalink
Stop updating legacy repositories history
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Dec 12, 2024
1 parent 1d82a0d commit d887c0d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions repos.d/deb/ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
packagelinks:
{% if packages %}
- type: PACKAGE_HOMEPAGE
# TODO: it's {{codename}}-updates for corresponding repos!
url: 'https://packages.ubuntu.com/source/{{codename}}/{srcname}'
{% endif %}
- type: PACKAGE_HOMEPAGE
Expand Down
42 changes: 21 additions & 21 deletions sql.d/update/update_histories.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
--------------------------------------------------------------------------------

-- per-repository counters
INSERT INTO repositories_history (
ts,
snapshot
)
SELECT
now(),
jsonb_object_agg(snapshot.name, to_jsonb(snapshot) - 'name')
FROM (
SELECT
name,
num_metapackages,
num_metapackages_unique,
num_metapackages_newest,
num_metapackages_outdated,
num_metapackages_comparable,
num_metapackages_problematic,
num_problems,
num_maintainers,
num_metapackages_vulnerable
FROM repositories
) AS snapshot;
--INSERT INTO repositories_history (
-- ts,
-- snapshot
--)
--SELECT
-- now(),
-- jsonb_object_agg(snapshot.name, to_jsonb(snapshot) - 'name')
--FROM (
-- SELECT
-- name,
-- num_metapackages,
-- num_metapackages_unique,
-- num_metapackages_newest,
-- num_metapackages_outdated,
-- num_metapackages_comparable,
-- num_metapackages_problematic,
-- num_problems,
-- num_maintainers,
-- num_metapackages_vulnerable
-- FROM repositories
--) AS snapshot;

INSERT INTO repositories_history_new (
repository_id,
Expand Down

0 comments on commit d887c0d

Please sign in to comment.