On 6/10/26 3:28 AM, Andrei Radchenko wrote:
Hi, Maxwell.

I did try your idea and from quick testing it seems to work, including upgrade.
I tested with enabling sub packages is 22 and 24 then:
Forced nodejs22 meta: `dnf install nodejs-22.22.2` - gives you nodejs, nodejs22, including binary etc; `dnf upgrade nodejs` - upgrades to nodejs24, replacing `nodejs`, `nodejs-npm`.
<snip>> <https://copr.fedorainfracloud.org/coprs/aradchen/nodejs-meta-sub-packages/>
Regards,
Andrei

Thanks for the update! I took a look at nodejs26.spec from the new Copr. (Side note: it might make sense to put the new specfiles in some git repo so it's easier to review changes.)

I think the unversioned nodejs package needs to have

```
Provides:       alternative-for(nodejs-bin) = %{node_evr}
Conflicts:      alternative-for(nodejs-bin)
```

and the unversioned nodejs-npm would need

```
Provides:       alternative-for(nodejs-npm-bin) = %{npm_evr}
Conflicts:      alternative-for(nodejs-npm-bin)
```

now that there are no unversioned -bin subpackages, since this is necessary to avoid file conflicts with the other nodejsNN-bin packages.

Also, I see that both nodejsNN-npm and the unversioned nodejs-npm Provide npm. I guess only the unversioned one should Provide npm so that users get the default version when running "dnf install npm."


Other than that, this looks reasonable.

Not sure if we can make it clear out nodejs(old) stuff in the same
transaction but that's not blocking atm.

Does dnf autoremove work here? If the only package that explicitly requires nodejsNN is the metapackage, I would guess that updating the metapackage to depend on nodejs(NN+2) would allow nodejsNN to be cleaned up on a user system.

Obsoletes wouldn't work here because there's no way to differentiate between nodejsNN installed explicitly versus nodejsNN installed by the metapackage.

But yeah, I think the main goal is for the metapackage to "roll" properly and have the /usr/bin/{node,npm} symlinks automatically get updated to the new node version, and the current approach does accomplish that AFAICS.
--
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to