Ostree image with newer cpp package than in Fedora 40 repos

I tried to update Kinoite today and I’ve got an error about a package conflict:

cannot install both cpp-14.1.1-7.fc40.x86_64 from updates and cpp-14.2.1-1.fc40.x86_64 from @System

I’ve got VirtualBox installed for work which depends on gcc which depends on cpp.

Looking at

$ rpm-ostree upgrade --preview
...
AvailableUpdate:
        Version: 40.20240805.0 (2024-08-05T00:49:54Z)
         Commit: 32bba2481227b03762383446e4295dc1d1bbff2b1da9c4caa449c42dc552a154
...
       Upgraded: cpp 14.1.1-7.fc40 -> 14.2.1-1.fc40

it seems that the new image has newer cpp (14.2.1) than what’s in the Fedora repos (14.1.1, cpp - Fedora Packages).

I guess this is an oversight of the Kinoite image maintainers.

I’m not sure if it would be a good idea to layer the older cpp package?

For what it’s worth, in Fedora Silverblue these packages are upgraded.

hricky@silverblue  >_ sudo rpm-ostree db diff 

ostree diff commit from: rollback deployment (90b5a5e2c6e8a7b2750c960aa0279443173ec382471ad26bf7bec3a282199010)
ostree diff commit to:   booted deployment (b97e339f7c4963c0d79b3ef133dc5cdb57bde681f971b695772d3335f56e601d)
Upgraded:
  cpp 14.1.1-7.fc40 -> 14.2.1-1.fc40
  evolution-data-server 3.52.3-1.fc40 -> 3.52.4-1.fc40
  evolution-data-server-langpacks 3.52.3-1.fc40 -> 3.52.4-1.fc40
  libatomic 14.1.1-7.fc40 -> 14.2.1-1.fc40
  libgcc 14.1.1-7.fc40 -> 14.2.1-1.fc40
  libgomp 14.1.1-7.fc40 -> 14.2.1-1.fc40
  libstdc++ 14.1.1-7.fc40 -> 14.2.1-1.fc40

cpp version 14.2.1 should now be available in Fedora repos:

⬢[fedora@toolbox fedora]$ sudo dnf install cpp
Last metadata expiration check: 0:01:19 ago on Mon 05 Aug 2024 01:14:01 AM PDT.
Dependencies resolved.
==========================================================================================
 Package           Architecture      Version                     Repository          Size
==========================================================================================
Installing:
 cpp               x86_64            14.2.1-1.fc40               updates             12 M
Installing dependencies:
 libmpc            x86_64            1.3.1-5.fc40                fedora              71 k

Transaction Summary
==========================================================================================
Install  2 Packages

Total download size: 12 M
Installed size: 35 M
Is this ok [y/N]: 

Could you try regenerating rpm repo metadata?

rpm-ostree refresh-md --force

and update again.

2 Likes

This looks like the solution.

I dont think it is even possible to ship newer packages in the ostree remotes than in the repos

Yes, after forcing the refresh it updated without problems. Thanks.

Well, the Kinoite image was somehow built with newer cpp than in the Fedora 40 repos or maybe some mirrors lag significantly. Fedora Packages site still shows 14.1.1 for 40 in the Overview but also under Activity says Fedora 40 Update: gcc-14.2.1-1.fc40 10 hours ago so not everything is in sync.