Bug 1942236 - dnf 4.6.0-1.fc32 breaks dnf
Summary: dnf 4.6.0-1.fc32 breaks dnf
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 32
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Nicola Sella
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2021-03-23 22:27 UTC by David B. Chorlian
Modified: 2021-03-27 01:54 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-03-27 01:23:47 UTC
Type: Bug

Attachments (Terms of Use)

Description David B. Chorlian 2021-03-23 22:27:14 UTC
Description of problem:
dnf upgrade dnf\* breaks dnf 

Version-Release number of selected component (if applicable):
 dnf 4.6.0-1.fc32

How reproducible:  Unknown

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Failure is in python and ends up with "ImportError: /lib64/libdnf.so.2: undefined symbol: modulemd_module_stream_v2_is_static_context"

This is very similar to a problem noted in Fedora forum on Oct. 10, 2020 as "dnf upgrade today breaks dnf" by Marko. Following his procedure, I attempted using rpm to go back to previous version. This failed. Perhaps the initial error was my failure to run "systemctl daemon-reload" immediately after the upgrade. Would reinstalling the upgrades and running "systemctl daemon-reload" . 

My apologies if this should have been posted elsewhere. I tried to put this in the Fedora forum but I couldn't log in.

Comment 1 Jan Pazdziora 2021-03-24 08:37:15 UTC
The Fedora 33 bugzilla is bug 1935408.

Comment 2 Jan Pazdziora 2021-03-24 08:39:08 UTC

  dnf upgrade --enablerepo=updates-testing -y dnf

does not help so it seems there isn't a fix on its way for Fedora 32.

Comment 3 Jan Pazdziora 2021-03-24 11:00:14 UTC
It's worth noting that the problem is not present on fresh Fedora 32 installations where the new dnf is installed from the very beginning (and whatever the other needed dependency is). A reproducer today is

$ podman run --rm -ti registry.fedoraproject.org/fedora:32 bash -c 'dnf upgrade -y dnf ; dnf install -y zsh'

because the image still has dnf-4.4.0-3.fc32.

Comment 4 Jan Pazdziora 2021-03-24 11:03:43 UTC
The workaround is to add libmodulemd to the upgrade transaction

$ podman run --rm -ti registry.fedoraproject.org/fedora:32 bash -c 'dnf upgrade -y dnf libmodulemd ; dnf install -y zsh'

That pulls in the needed libmodulemd-2.12.0-1.fc32.

Comment 5 Nicola Sella 2021-03-24 11:08:14 UTC
Hello, a fix with the required libmodulemd is on the way https://src.fedoraproject.org/rpms/libdnf/c/29c9c5358884185a4382cb077e65018e4dd0f29e?branch=f32

Comment 6 amatej 2021-03-24 11:12:18 UTC
On a broken system it can also be fixed by manually updating the libmodulemd, such as (for x86_64): 
$ rpm -U https://kojipkgs.fedoraproject.org//packages/libmodulemd/2.12.0/1.fc32/x86_64/libmodulemd-2.12.0-1.fc32.x86_64.rpm

Comment 7 Fedora Update System 2021-03-24 12:09:45 UTC
FEDORA-2021-a2e909d1fc has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a2e909d1fc

Comment 8 Fedora Update System 2021-03-25 02:07:22 UTC
FEDORA-2021-a2e909d1fc has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a2e909d1fc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a2e909d1fc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Jan Pazdziora 2021-03-25 15:33:51 UTC
Tested with podman run --rm -ti registry.fedoraproject.org/fedora:32 bash -c 'dnf upgrade -y --enablerepo=updates-testing dnf ; dnf install -y zsh' and it works. Karma left in bodhi.

Comment 10 Fedora Update System 2021-03-27 01:23:47 UTC
FEDORA-2021-a2e909d1fc has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 D. Hugh Redelmeier 2021-03-27 01:54:49 UTC
I hit this problem after
# dnf update --security
I don't normally use --security, but the owner of this computer hates update since they destabilize her computer.  Well, I just proved that point. 

I'm kind of in catch 22:
# podman run --rm -ti registry.fedoraproject.org/fedora:32 bash -c 'dnf upgrade -y --enablerepo=updates-testing dnf ; dnf install -y zsh'
fails because I don't have podman.  So I need  dnf to install it.  But, of course, dnf is broken.

So I try from comment 6:
# rpm -U https://kojipkgs.fedoraproject.org//packages/libmodulemd/2.12.0/1.fc32/x86_64/libmodulemd-2.12.0-1.fc32.x86_64.rpm
Note the #, not the $.
This fails:
error: Failed dependencies:
	libmodulemd(x86-64) = 2.9.3-1.fc32 is needed by (installed) python3-libmodulemd-2.9.3-1.fc32.x86_64

So I  tried
# yum update python3-libmodulemd
But that fails because yum is now just dnf, pretending.

In the end, this seems to have worked, all in one line:
# rpm -U https://kojipkgs.fedoraproject.org//packages/libmodulemd/2.12.0/1.fc32/x86_64/libmodulemd-2.12.0-1.fc32.x86_64.rpm  https://kojipkgs.fedoraproject.org//packages/libmodulemd/2.12.0/1.fc32/x86_64/python3-libmodulemd-2.12.0-1.fc32.x86_64.rpm

I know that this bug is closed but perhaps this comment will help others experiencing this problem.

Note You need to log in before you can comment on or make changes to this bug.