Hide Forgot
Created attachment 1200371 [details] DNF failure backtrace on update Description of problem: Dnf kept failing with "AssertionError: Unknown reason: 4": $ sudo dnf update (...) File "/usr/lib/python3.5/site-packages/dnf/base.py", line 451, in _goal2transaction ts.add_install(pkg, obs, goal.get_reason(pkg)) File "/usr/lib/python3.5/site-packages/dnf/goal.py", line 43, in get_reason assert False, 'Unknown reason: %d' % code AssertionError: Unknown reason: 4 After adding a print trace, there's 2 packages that causes this. It works fine if excluding the 2 packages that break dnf: dnf update -x oci-register-machine -x oci-systemd-hook The error do not happen once OS is updated. It happens that the 2 packages above are recommended by docker. I guess those 2 packages are 2 new recommends from the docker package The error can be reproduced with downgrade: # LC_ALL=C dnf downgrade docker --allowerasing (...) File "/usr/lib/python3.5/site-packages/dnf/base.py", line 452, in _goal2transaction ts.add_install(pkg, obs, goal.get_reason(pkg)) File "/usr/lib/python3.5/site-packages/dnf/goal.py", line 43, in get_reason assert False, 'Unknown reason: %d' % code AssertionError: Unknown reason: 4 The full backtraces are attached. Version-Release number of selected component (if applicable): dnf-1.1.10-1.fc24.noarch How reproducible: Awlays Steps to Reproduce: 1. try to update a system where docker was installed 2. or install docker w/o oci* then try to downgrade docker 3. Actual results: dnf fails, it's no more possible to update Expected results: Dnf should ignore the packages it cannot handle and just reports warnings but must continue updating the *other* packages Extra information: docker-1.10.3-50.gita612434.fc24.x86_64
Created attachment 1200373 [details] DNF failure backtrace on downgrade
What version of DNF/RPM/libhif/hawkey you have?
Note that the line number in base.py has shifted in the 2nd backtrace b/c I'd added a "print(pkg)" line
(In reply to Igor Gnatenko from comment #2) > What version of DNF/RPM/libhif/hawkey you have? $ rpm -q rpm dnf hawkey libhif rpm-4.13.0-0.rc1.27.fc24.x86_64 dnf-1.1.10-1.fc24.noarch hawkey-0.6.3-6.fc24.x86_64 libhif-0.2.3-1.fc24.x86_64
And according to the following command, they were not part of the update with -x, so both backtraces were with those versions: # rpm -q --qf '%{installtime} %{name}\n' rpm dnf hawkey libhif |sort 1466468385 rpm 1469370794 libhif 1471815727 dnf 1473241481 hawkey
It was due to having a newer (unreleased) hawkey