Commit graph

20 commits

Author SHA1 Message Date
Yorhel
044e4218f5 Switch mirror for Centos-stream 2025-10-23 11:45:35 +02:00
Yorhel
147911b750 CentOS 10 & Ubuntu mirror switch 2025-01-04 10:32:58 +01:00
Yorhel
57de5699e8 Repo updates + some /about page wording 2024-10-30 09:58:09 +01:00
Yorhel
0c1b140638 FreeBSD 14.1 2024-06-07 07:19:12 +02:00
Yorhel
83ab6c3671 Get rid of package categories
Whether or not the package name itself or the (category,name) tuple
uniquely identified a package within a system has been a source of
confusion for a long time. Back in
03d278e4ff I ended up playing playing it
"safe" by going for (category,name), but in practice this doesn't make a
whole lot of sense. While it's *possible* for the same package name to
refer to completely different packages in different "categories", in
reality distributions can't sanely support this anyway.

For distributions where the category referred to a repository, the only
cases where the same package name was used in different repos was when
the package has moved from one repo to another. Those should certainly
not be treated as different packages.

For distributions where the category really referred to a category,
there's the Debian approach where the category is purely a tag and
doesn't help identify the package in any way, and then there's FreeBSD
where the category technically ought to be part of the name.  There were
a few cases where FreeBSD used categories to separate out different
versions of the same package (e.g. ipv6 vs non-ipv6), but none were
relevant for man pages so I ended up merging those as well.

Getting rid of the categories simplifies and shortens URLs, unclutters
the UI a little bit and merges the packages in listings that should've
been merged all along.

Migration script:

  -- Merge packages that are in multiple categories.
  -- All versions are moved to the package with the lowest ID.
  -- If the same version already exists in a lower ID, the higher-ID version is deleted.
  BEGIN;
  WITH migrate(old, new, second) AS (
    SELECT q.id, MIN(p.id), MAX(p.id)
      FROM packages p
      JOIN packages q ON q.id > p.id AND p.system = q.system AND p.name = q.name
     GROUP BY q.id
  ), ded(n) AS (
    UPDATE packages SET dead = false
      FROM migrate m
      JOIN packages q ON q.id = m.old
     WHERE packages.id = m.new AND packages.dead AND NOT q.dead
    RETURNING 1
  ), mov(n) AS (
    UPDATE package_versions SET package = m.new
      FROM migrate m
     WHERE package_versions.package = m.old
       AND NOT EXISTS(
          SELECT 1
            FROM package_versions v
           WHERE v.package IN(m.new, m.second)
             AND v.version = package_versions.version)
    RETURNING 1
  ), del(n) AS (
    DELETE FROM packages WHERE id IN(SELECT old FROM migrate)
    RETURNING 1
  ) SELECT (SELECT count(*) FROM migrate) AS migrate,
           (SELECT count(*) FROM ded) AS ded,
           (SELECT count(*) FROM mov) AS mov,
           (SELECT count(*) FROM del) AS del;

  ALTER TABLE packages DROP CONSTRAINT packages_system_name_category_key;
  CREATE UNIQUE INDEX packages_system_name_key ON packages (system, name);
  ALTER TABLE packages DROP COLUMN category;
  COMMIT;
2024-04-28 10:37:04 +02:00
Yorhel
81c9ec53ff Bunch of repo updates 2022-12-17 13:06:42 +01:00
Yorhel
775eabfb7e Some repo updates
Haven't done this in a while, was lagging behind quite a bit.
FreeBSD also has two new versions that need to be indexed, will add
those later.
2022-07-26 07:25:38 +02:00
Yorhel
b8dca570a0 Add CentOS 8.5
It's still supported? I thought they dropped it early in favor of CentOS
Stream or something.
2021-12-11 11:49:36 +01:00
Yorhel
e69850d100 CentOS 8.4 2021-09-15 10:39:49 +02:00
Yorhel
61965f23f6 Add Ubuntu 21.04 + stop syncing a few old distros 2021-04-23 11:48:59 +02:00
Yorhel
7b791561aa Add CentOS 7.9 & 8.3
Just lazy maintenance. I need to figure out what to do with CentOS now
that they've switched to a different release model.
2021-04-17 11:13:25 +02:00
Yorhel
777dd37e1b Add CentOS 8.2 2020-10-14 15:22:46 +02:00
Yorhel
faa1cd6e55 Add CentOS 7.7 2020-10-14 15:10:54 +02:00
Yorhel
1d8490dde9 Add CentOS 8.1 2020-03-14 10:34:21 +01:00
Yorhel
cf5c16241f Add CentOS 8.0 2019-10-22 21:10:44 +02:00
Yorhel
6fe905f7c9 Add CentOS 7.7 2019-10-22 20:18:01 +02:00
Yorhel
0142896a96 Add CentOS 7.6 2018-12-04 18:15:20 +01:00
Yorhel
617a76eeba Add CentOS 6.10 and FreeBSD 11.2 2018-07-06 07:51:13 +02:00
Yorhel
7bb4397f9b Add CentOS 7.5 + Fix Fedora 28 updates repo 2018-06-02 07:34:54 +02:00
Yorhel
035538f156 Add CentOS 2018-01-21 08:13:05 +01:00