Description of problem: After dnf upgrade to dnf-4.4.0-1.fc33.noarch, dnf starts to fail with AttributeError: '<class 'dnf.conf.config.MainConf'>' object has no attribute 'tempfiles' Version-Release number of selected component (if applicable): dnf-4.4.0-1.fc33.noarch How reproducible: Deterministic. Steps to Reproduce: 1. dnf upgrade -y dnf 2. dnf upgrade -y dnf Actual results: Fedora 33 openh264 (From Cisco) - x86_64 2.0 kB/s | 2.5 kB 00:01 Fedora Modular 33 - x86_64 4.6 MB/s | 3.3 MB 00:00 Fedora Modular 33 - x86_64 - Updates 338 B/s | 257 B 00:00 Fedora Modular 33 - x86_64 - Test Updates 2.1 MB/s | 1.3 MB 00:00 Fedora 33 - x86_64 - Test Updates 26 MB/s | 20 MB 00:00 Fedora 33 - x86_64 - Updates 2.6 kB/s | 257 B 00:00 Fedora 33 - x86_64 8.6 MB/s | 62 MB 00:07 Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Upgrading: dnf noarch 4.4.0-1.fc33 updates-testing 445 k dnf-data noarch 4.4.0-1.fc33 updates-testing 46 k python3-dnf noarch 4.4.0-1.fc33 updates-testing 411 k yum noarch 4.4.0-1.fc33 updates-testing 43 k Installing dependencies: dbus-libs x86_64 1:1.12.20-2.fc33 fedora 154 k libevent x86_64 2.1.8-10.fc33 fedora 257 k unbound-libs x86_64 1.10.1-4.fc33 fedora 512 k Installing weak dependencies: deltarpm x86_64 3.6.2-7.fc33 fedora 89 k python3-unbound x86_64 1.10.1-4.fc33 fedora 101 k rpm-plugin-systemd-inhibit x86_64 4.16.0-1.fc33 updates-testing 23 k Transaction Summary ================================================================================ Install 6 Packages Upgrade 4 Packages Total download size: 2.0 M Downloading Packages: (1/10): rpm-plugin-systemd-inhibit-4.16.0-1.fc3 2.3 MB/s | 23 kB 00:00 (2/10): dbus-libs-1.12.20-2.fc33.x86_64.rpm 8.3 MB/s | 154 kB 00:00 (3/10): libevent-2.1.8-10.fc33.x86_64.rpm 13 MB/s | 257 kB 00:00 (4/10): python3-unbound-1.10.1-4.fc33.x86_64.rp 7.2 MB/s | 101 kB 00:00 (5/10): unbound-libs-1.10.1-4.fc33.x86_64.rpm 28 MB/s | 512 kB 00:00 (6/10): dnf-4.4.0-1.fc33.noarch.rpm 24 MB/s | 445 kB 00:00 (7/10): dnf-data-4.4.0-1.fc33.noarch.rpm 9.6 MB/s | 46 kB 00:00 (8/10): yum-4.4.0-1.fc33.noarch.rpm 11 MB/s | 43 kB 00:00 (9/10): python3-dnf-4.4.0-1.fc33.noarch.rpm 43 MB/s | 411 kB 00:00 (10/10): deltarpm-3.6.2-7.fc33.x86_64.rpm 16 kB/s | 89 kB 00:05 -------------------------------------------------------------------------------- Total 333 kB/s | 2.0 MB 00:06 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : libevent-2.1.8-10.fc33.x86_64 1/14 Running scriptlet: unbound-libs-1.10.1-4.fc33.x86_64 2/14 Installing : unbound-libs-1.10.1-4.fc33.x86_64 2/14 Running scriptlet: unbound-libs-1.10.1-4.fc33.x86_64 2/14 Installing : python3-unbound-1.10.1-4.fc33.x86_64 3/14 Upgrading : dnf-data-4.4.0-1.fc33.noarch 4/14 Installing : deltarpm-3.6.2-7.fc33.x86_64 5/14 Installing : dbus-libs-1:1.12.20-2.fc33.x86_64 6/14 Installing : rpm-plugin-systemd-inhibit-4.16.0-1.fc33.x86_64 7/14 Upgrading : python3-dnf-4.4.0-1.fc33.noarch 8/14 Upgrading : dnf-4.4.0-1.fc33.noarch 9/14 Running scriptlet: dnf-4.4.0-1.fc33.noarch 9/14 Upgrading : yum-4.4.0-1.fc33.noarch 10/14 Cleanup : yum-4.2.23-2.fc33.noarch 11/14 Running scriptlet: dnf-4.2.23-2.fc33.noarch 12/14 Cleanup : dnf-4.2.23-2.fc33.noarch 12/14 Running scriptlet: dnf-4.2.23-2.fc33.noarch 12/14 Cleanup : python3-dnf-4.2.23-2.fc33.noarch 13/14 Cleanup : dnf-data-4.2.23-2.fc33.noarch 14/14 Running scriptlet: dnf-data-4.2.23-2.fc33.noarch 14/14 Verifying : rpm-plugin-systemd-inhibit-4.16.0-1.fc33.x86_64 1/14 Verifying : dbus-libs-1:1.12.20-2.fc33.x86_64 2/14 Verifying : deltarpm-3.6.2-7.fc33.x86_64 3/14 Verifying : libevent-2.1.8-10.fc33.x86_64 4/14 Verifying : python3-unbound-1.10.1-4.fc33.x86_64 5/14 Verifying : unbound-libs-1.10.1-4.fc33.x86_64 6/14 Verifying : dnf-4.4.0-1.fc33.noarch 7/14 Verifying : dnf-4.2.23-2.fc33.noarch 8/14 Verifying : dnf-data-4.4.0-1.fc33.noarch 9/14 Verifying : dnf-data-4.2.23-2.fc33.noarch 10/14 Verifying : python3-dnf-4.4.0-1.fc33.noarch 11/14 Verifying : python3-dnf-4.2.23-2.fc33.noarch 12/14 Verifying : yum-4.4.0-1.fc33.noarch 13/14 Verifying : yum-4.2.23-2.fc33.noarch 14/14 Upgraded: dnf-4.4.0-1.fc33.noarch dnf-data-4.4.0-1.fc33.noarch python3-dnf-4.4.0-1.fc33.noarch yum-4.4.0-1.fc33.noarch Installed: dbus-libs-1:1.12.20-2.fc33.x86_64 deltarpm-3.6.2-7.fc33.x86_64 libevent-2.1.8-10.fc33.x86_64 python3-unbound-1.10.1-4.fc33.x86_64 rpm-plugin-systemd-inhibit-4.16.0-1.fc33.x86_64 unbound-libs-1.10.1-4.fc33.x86_64 Complete! # dnf upgrade -y dnf Traceback (most recent call last): File "/usr/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 201, in user_main errcode = main(args) File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 66, in main with dnf.cli.cli.BaseCli(conf_class()) as base: File "/usr/lib/python3.9/site-packages/dnf/conf/config.py", line 210, in __init__ config = libdnf.conf.ConfigMain() File "/usr/lib64/python3.9/site-packages/libdnf/conf.py", line 1065, in __init__ _conf.ConfigMain_swiginit(self, _conf.new_ConfigMain()) RuntimeError: SWIG director method error. Error detected when calling 'Logger.write' Exception ignored in: <function MainConf.__del__ at 0x7fb87f813430> Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/dnf/conf/config.py", line 236, in __del__ for file_name in self.tempfiles: File "/usr/lib/python3.9/site-packages/dnf/conf/config.py", line 66, in __getattr__ raise AttributeError("'{}' object has no attribute '{}'".format(self.__class__, name)) AttributeError: '<class 'dnf.conf.config.MainConf'>' object has no attribute 'tempfiles' # Expected results: No error when running the command the second time. Additional info: I run this in vanilla registry.fedoraproject.org/fedora:33 container which initially has dnf-4.2.23-2.fc33.noarch, should it matter.
Adding python3-libdnf to the dnf upgrade command makes the subsequent dnf operation pass. It adds python3-libdnf-0.54.2-1.fc33.x86_64 (and python3-hawkey-0.54.2-1.fc33.x86_64) to the transaction, upgrading it from python3-libdnf-0.48.0-4.fc33.x86_64 ... so it looks like dnf is missing some versioned dependencies.
It is indeed missing a dependency on new libdnf. We will make a new build. Thank you for the report!
*** Bug 1886765 has been marked as a duplicate of this bug. ***
FEDORA-2020-3d0c0ec81a has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-3d0c0ec81a
FEDORA-2020-47a7fbf50d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-47a7fbf50d
FEDORA-2020-47a7fbf50d has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-47a7fbf50d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-47a7fbf50d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-3d0c0ec81a has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-3d0c0ec81a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-3d0c0ec81a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-47a7fbf50d has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-9765318e8b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9765318e8b
FEDORA-2020-9765318e8b has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9765318e8b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9765318e8b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
What is the fastest way to restore a non-working system with this issue? `dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-9765318e8b` just fails with the same error because dnf is broken.
Ok, downloading python3-libdnf and libdnf from https://koji.fedoraproject.org/koji/buildinfo?buildID=1627240 and manually doing `rpm -ivh --force` on each got me back to a working state.
(In reply to Raman Gupta from comment #12) > Ok, downloading python3-libdnf and libdnf from > https://koji.fedoraproject.org/koji/buildinfo?buildID=1627240 and manually > doing `rpm -ivh --force` on each got me back to a working state. Thanks Raman for this fix. The comment from the Fedora Update System that we can install the update using "dnf" is not very helpful, given that dnf is broken and cannot install updates. :-/
> `rpm -ivh --force` This is bad advice. It can leave orphan files and duplicate packages left behind, not to mention actually severely break things. Never ever use -i except for kernels, and --force is almost never needed to sort out a problem, don't use it unless you really know what you're doing.
Don't break DNF and we won't have to run commands like that. :) All cheek aside what is the right command to run in this situation? Should it have been rpm -U?
FEDORA-2020-9765318e8b has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
Running rpm -U (or rpm -Uvh) is probably the cleanest way.
FEDORA-2020-3d0c0ec81a has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.