Commit graph

24 commits

Author SHA1 Message Date
Yorhel
57de5699e8 Repo updates + some /about page wording 2024-10-30 09:58:09 +01: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
97b88a989f Add Fedora 40 2024-04-23 17:26:35 +02:00
Yorhel
c2a1dd6416 Some fixes and repo updates 2023-11-26 10:33:30 +01:00
Yorhel
580fa89520 Also update Ubuntu 2023-05-27 21:17:04 +02:00
Yorhel
e77775246c Repo updates 2023-05-27 06:48:19 +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
fa8e084879 Bunch of fixes 2022-01-10 20:05:09 +01:00
Yorhel
1572f6cedf Add Fedora 34 2021-04-29 07:06:27 +02:00
Yorhel
61965f23f6 Add Ubuntu 21.04 + stop syncing a few old distros 2021-04-23 11:48:59 +02:00
Yorhel
fb3f1f8af4 Add Fedora 33
Had to switch to a different mirror as the previous one hadn't synced
yet.
2020-10-28 07:42:22 +01:00
Yorhel
81874c5d3f Add Fedora 32 2020-10-14 15:33:08 +02:00
Yorhel
18f792b443 Add Fedora 31 2020-03-14 10:57:20 +01:00
Yorhel
d2e7719b3f Add Fedora 30 2019-07-20 09:42:23 +02:00
Yorhel
df33c43a9c Fedora 27 is not updated anymore 2019-04-05 10:23:04 +02:00
Yorhel
99628559ed Add Fedora 29 2018-11-01 17:23:40 +01:00
Yorhel
577e519e7d Fedora 26 is EOL 2018-07-17 17:02:33 +02:00
Yorhel
7bb4397f9b Add CentOS 7.5 + Fix Fedora 28 updates repo 2018-06-02 07:34:54 +02:00
Yorhel
bb236c1f0e Add Ubuntu 18.04 + Fedora 28 2018-05-01 20:30:27 +02:00
Yorhel
6120b2fa5a Add Fedora 27 2017-11-16 12:15:54 +01:00
Yorhel
2388aaefcc Stop syncing Fedora 24; Add FreeBSD 11.1 and Ubuntu 17.10 2017-10-20 21:37:33 +02:00
Yorhel
cb2d970d3a Add Fedora 26 + stop syncing old Ubuntu 2017-07-22 12:27:40 +02:00
Yorhel
bb46087068 Add Fedora 1 - 25 2017-01-21 09:05:34 +01:00