Skip to content

Feature request: Output a warning on `pkgctl release` if nvchecker intergration is not (properly) setup

We adopted nvchecker as our standard tool for packaging version handling and we'd like to rely on its integration in our packages sources (in the form of the .nvchecker.toml file) for future automation on that front (some efforts have already started and are currently being tested, see https://gitlab.archlinux.org/archlinux/nvchecker-poc & archlinux/packaging/packages/codespell#2 (closed) for instance).

As such, I think it would be great for pkgctl to emit a WARNING during release if the nvchecker integration is not setup (or not correctly), as a way to remind packagers to set it up and detect eventual issues.

The way I imagine it would be a check performed when pkgctl release is invoked which would test the following:

  • Does the .nvchecker.toml file exists? If not, output a WARNING that nvchecker integration isn't set up (and maybe hint that pkgctl version setup is a thing 😛).
  • If the .nvchecker.toml exists, test it. For instance, by running pkgctl version check and verifying that the exit code is equal to 0 or 2. If not, output a WARNING that the nvchecker integration might be broken.

Some packages (e.g. meta packages) don't really have any upstream to follow in terms of versioning, so the check needs a way to be muted in order to avoid false positives in such cases. A potential solution could be to add a specific property in the .nvchecker.toml file that can be checked in order to react properly during version check (e.g. skip it).
Another thing to keep in mind is that such a check will make nvchecker a hard dependency for devtools (it's an optional one currently).

I'm opening this issue to confirm the usefulness of this idea and to agree of the implementation's specifications before opening a MR for it :)

Edited by Robin Candau
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information