On Wed, Mar 20, 2024 at 12:35 PM Jan Staněk <jstanek(a)redhat.com> wrote:
Hello all,
recently, when trying to spin up a CI for NodeJS in Fedora, I ran into a
slight problem: when a NodeJS stream is the default one, versioned
packages (i.e. nodejs20) are not generated and are not installable.
For example, on current rawhide, I cannot install `nodejs20` package,
only `nodejs`; this will give me the version 20.x as expected.
The problem is that this complicates the CI setup,
and requires me to take into account which Fedora I'm currently on.
As an example, when adding tests for nodejs20 dist-git[1],
I would like to simply specify `requires: nodejs20` into the test
metadata. However, with the current setup, I would need something akin
to the following (pseudocode, I did not really test if that would work):
requires:
- {% if fedora == 40 %}nodejs{% else %}nodejs20{% fi %}
In addition to being more complicated, this will also break if the
default stream for a given Fedora version ever change
(which is not unlikely to happen, as the upstream release schedule
is not really synchronized with the Fedore one).
The default version is fixed for the life of each Fedora release. It
works out fine, because we always use whichever is the most recent LTS
release that will be supported through the life of that Fedora
release.
That said, I agree that it's completely reasonable to have the default
version also `Provides: nodejsXX` and I'll look into it.
---
I recall that the current status is the result of already existing
long discussion, with associated debugging, so I would like to have this
solved with as minimal disruption as possible. That being said,
what is the reason for having the non-versioned packages (`nodejs`) *in
stead* of the versioned ones (`nodejs20`), as opposed to *in addition*
to them?
I'm confused; it *is* in addition to the versioned ones. We just don't
duplicate the default version because it would be a complete waste.
The non-versioned packages could then require the appropriate
versioned
ones and contain only symlinks (/usr/bin/node → /usr/bin/node-20,
/usr/lib/node_modules → /usr/lib/node_modules_20, etc.).
The overly-simplified answer here is mainly that there are too many
symlinks to maintain for this to be practical.