V Thu, Dec 04, 2025 at 06:01:14PM +0100, Dominik 'Rathann' Mierzejewski napsal(a): > On Thursday, 04 December 2025 at 17:29, Petr Pisar wrote: > > V Thu, Dec 04, 2025 at 04:50:00PM +0100, Petr Pisar napsal(a): > > > V Thu, Dec 04, 2025 at 12:33:54PM +0100, Jan Stanek napsal(a): > > > > Hi all, > > > > in the process of polishing the upgrade path > > > > for the nodejs metapackage proposal [1], > > > > I've created a COPR [2] to ensure we can cleanly upgrade > > > > from the current nodejs packages (that currently ship NodeJS v22.x) > > > > to the versioned package names (nodejs22) and meta-package (nodejs) > > > > combination. > > > > However, dnf keeps behaving differently than I would expect, > > > > and I'm at the end of ideas of what might be wrong. > > > > > > > > What I would expect: `dnf install nodejs` will select nodejs metapackage > > > > for install, which pulls nodejs22 as a dependency. > > > > > > > > What happens: `dnf install nodejs` installs nodejs22 directly. > > > > > > > I confirm it behaves like that. A workaround is asking for a package name > > > "nodejs.noarch". It maybe has something to do with how DNF5 distinguishes > > > arguments as package names, provides, file names, etc. There is a heavy > > > historical baggage how it should be done and it's quite possible you > > > found an > > > unwanted side effect of it. > > > > > Or the bug prevents switching from x86_64 to noarch. Observe the Fedora's > > package and the installed package is x86_64, while the copr package is > > noarch: > > Switching arches requires adding Obsoletes:, otherwise it doesn't work. > So, either keep it archful, or use Obsoletes. > noarch is supposed to be handled specially and not to require Obsoletes.
Looking again at the solver output:
# dnf5 --noplugins --repo copr:copr.fedorainfracloud.org:jstanek:nodejs22-bin
upgrade
Updating and loading repositories:
Repositories loaded.
Package Arch Version Repository
Size
Installing:
nodejs22-full-i18n x86_64 1:22.21.1-6.fc44
copr:copr.fedorainfracloud 30.4 MiB
replacing nodejs-full-i18n x86_64 1:22.21.1-3.fc44 f44-build
30.4 MiB
nodejs22-npm x86_64 1:10.9.4-1.22.21.1.6.fc44
copr:copr.fedorainfracloud 8.8 MiB
replacing nodejs-npm x86_64 1:10.9.4-1.22.21.1.3.fc44 f44-build
8.8 MiB
Installing dependencies:
nodejs22 x86_64 1:22.21.1-6.fc44
copr:copr.fedorainfracloud 161.5 KiB
replacing nodejs x86_64 1:22.21.1-3.fc44 f44-build
161.5 KiB
nodejs22-libs x86_64 1:22.21.1-6.fc44
copr:copr.fedorainfracloud 78.1 MiB
replacing nodejs-libs x86_64 1:22.21.1-3.fc44 f44-build
78.1 MiB
It is actually correct resolution: New nodejs22 obsolets old nodejs,
so not upgrading nodejs and replacing it with nodejs is also a solution.
Another solution (intended by the original poster) would be upgrading nodejs
(and if nodejs22 is needed for different reasons, then installing that).
This dichotomy is actually documented as a not-a-bug in dnf5-install(8) manual:
On the other hand if package-spec-NPFB specifies only a name and
obsoletes are enabled, DNF also takes into account packages obsoleting
that name. Note that this can lead to seemingly unexpected results
if the version of an installed package is obsoleted and the installed
package also has newer version available. It creates a split in
upgrade-path and both ways are considered correct, the resulting
package is picked simply by lexicographical order.
Actually the first resolution keeps the package set minimal, so from this
point of view it's better.
-- Petr
signature.asc
Description: PGP signature
-- _______________________________________________ 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://pagure.io/fedora-infrastructure/new_issue
