Dnf updates have been failing post latest dnf reposync

dnf update

Rocky Linux 9 - BaseOS 2.2 MB/s | 2.3 MB 00:01
Rocky Linux 9 - AppStream 29 MB/s | 8.0 MB 00:00
Rocky Linux 9 - Extras 101 kB/s | 15 kB 00:00
Error:
Problem 1: cannot install the best update candidate for package python-unversioned-command-3.9.16-1.el9.noarch

  • nothing provides python3 = 3.9.18-3.el9_4.5 needed by python-unversioned-command-3.9.18-3.el9_4.5.noarch
    Problem 2: package python-unversioned-command-3.9.16-1.el9.noarch requires python3 = 3.9.16-1.el9, but none of the providers can be installed
  • cannot install both python3-3.9.18-3.el9_4.6.x86_64 and python3-3.9.16-1.el9.x86_64
  • problem with installed package python-unversioned-command-3.9.16-1.el9.noarch
  • cannot install the best update candidate for package python3-3.9.16-1.el9.x86_64
  • nothing provides python3 = 3.9.18-3.el9_4.5 needed by python-unversioned-command-3.9.18-3.el9_4.5.noarch
    (try to add ‘–allowerasing’ to command line to replace conflicting packages or ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

Any takes on why this issues suddenly?
The base ami i am using in ami-07d75f492ac3a326f in us-east-1

The current version of python3 on my RL9 is:
python3-3.9.18-3.el9_4.6.x86_64

You have to install the “unversioned-commands” package that matches the base system version.

On my system it is installed by default:

$ sudo dnf install python-unversioned-command
Last metadata expiration check: 2:24:20 ago on Fri 08 Nov 2024 06:33:27 AM EST.
Package python-unversioned-command-3.9.18-3.el9_4.6.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!

You wrote dnf reposync

Is it that you have a local copy of repos that you sync from online mirror?
Do the

Rocky Linux 9 - BaseOS 2.2 MB/s | 2.3 MB 00:01
Rocky Linux 9 - AppStream 29 MB/s | 8.0 MB 00:00
Rocky Linux 9 - Extras 101 kB/s | 15 kB 00:00

point to your local copy?

One could suspect that the latest sync has failed to produce complete and coherent repos.
Therefore, a new sync could fix that.


If I run

dnf list --showduplicates python3 python-unversioned-command

I do see that I don’t have python-unversioned-command installed.

If I run

dnf -q rq -l python-unversioned-command
/usr/bin/python
/usr/share/man/man1/python.1.gz

I see that that package merely adds one command (which I obviously have no need for).
Furthermore, (on AlmaLinux 9), by

dnf -q rq --groupmember python-unversioned-command
dnf -q rq --whatrequires python-unversioned-command
dnf -q rq --requires texlive-xepersian

only package texlive-xepersian explicitly requires /usr/bin/python.

In other words, if I had python-unversioned-command installed, it should be relatively easy to remove it and later reinstall, once rest of system is up to date. I.e.

dnf rm python-unversioned-command       #1 (if it looks safe)
dnf up                                  #2
dnf install python-unversioned-command  #3 (and whatever else was remowed in #1)

Weirdly this specific got fixed on a dnf reposync now.
However encountering some other issue’s now related to modular metadata

No available modular metadata for modular package 'postgresql-16.1-1.module+el9.4.0+20018+a4fc542f.x86_64', it cannot be installed on the system
No available modular metadata for modular package 'postgresql-private-libs-16.1-1.module+el9.4.0+20018+a4fc542f.x86_64', it cannot be installed on the system

I have all these packages in the repo’s, not sure what’s going on, never encountered these before

I did a dnf reposync -g --delete -p /path/to/appstream --download-metadata --repoid=appstream
on my repo ass well which synced but did not rebuild the metadata for modular rpms.

Is there a way this metadata for modular rpms can be rebuilt?