Hello Fedora!

As part of experimenting with providing alternative binary packages
for NodeJS (see the Change proposal [1], and especially the feedback
section on why we are trying to do it this way), I have run into an
issue on how to specify that the various `-bin` packages will conflict
with each other. The most "straightforward" solution would be to list
them explicitly:

```
Name: nodejs24
...
%package bin
Conflicts: nodejs20-bin nodejs22-bin
```

Similar list would have to be specified in each stream, and then
manually updated each time we introduce a new stream (~ once a year).
This is very manual and error prone, and I'm trying to figure out if
there is a better way.

I have also found that you can conflict with a virtual Provides; so
while it feels like a hack, the following seems to work and would
eliminate the issue of having to keep updating the conflict lists:

```
%package bin
Provides: nodejs-bin = %{node_full_version}
Conflicts: nodejs-bin  # conflict with anything else that provides nodejs-bin
```

Using that name has the unfortunate side effect of allowing the user
to `# dnf install nodejs-bin`, which is something we probably do not
want to work (since that would not mesh nicely with the metapackage
approach [2]). So I'm thinking about using something less likely to be
required by dnf install:

```
%package bin
Provides: alternate(nodejs-bin) = %{node_full_version}
Conflicts: alternate(nodejs-bin)
```

I did not find anything usable in the packaging guidelines (since they
still recommend using update-alternatives for this sort of thing).

WDYT? Is using this combination of Provides and Conflicts acceptable?
If so, what about the naming and/or introducing the `alternate(X)`
designation?

Thanks in advance for any feedback!

[1]: https://fedoraproject.org/wiki/Changes/NodejsAlternativesSystem
[2]: https://fedoraproject.org/wiki/Changes/NodeJSMetapackages
--
Jan Stanek

Software Engineer

Red Hat

IM: @jstanek

-- 
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to