Description of problem: dnf crashes when trying to install packages without releasever set. Related to bug #1117293 and bug #1173107. Version-Release number of selected component (if applicable): dnf-1.0.2-2.fc22.noarch Steps to Reproduce: dnf -y --installroot /chroot --setopt reposdir=/dev/null --repofrompath main,http://kojipkgs.fedoraproject.org/repos/rawhide/latest/x86_64/ install setup Actual results: Traceback (most recent call last): File "/bin/dnf", line 36, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 190, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 146, in _main ret = resolving(cli, base) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 165, in resolving base.do_transaction(display=cli.demands.transaction_display) File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 219, in do_transaction super(BaseCli, self).do_transaction(display) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 595, in do_transaction self._run_transaction(cb=cb) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 717, in _run_transaction self.verify_transaction(cb.verify_tsi_package) File "/usr/lib/python2.7/site-packages/dnf/base.py", line 774, in verify_transaction yumdb_info.releasever = self.conf.releasever File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 295, in __setattr__ self._write(attr, value) File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 232, in _write dnf.pycomp.write_to_file(fo, value) File "/usr/lib/python2.7/site-packages/dnf/pycomp.py", line 91, in write_to_file f.write(content.encode('utf-8')) AttributeError: 'NoneType' object has no attribute 'encode' Additional info: Adding --releasever 24 prevents the crash from happening.
Michael, do you know where the problem is? Should this work with releasever refactoring?
Yep, it's caused by recent releasever change. Fixed in commit 58e71340c4f006893bc59f15bbb88f10b23f4098 don't store empty attributes (RhBug:1246928)
dnf-plugins-core-0.1.10-1.fc22, hawkey-0.6.0-1.fc22, dnf-1.1.0-2.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/FEDORA-2015-13162/dnf-plugins-core-0.1.10-1.fc22,dnf-1.1.0-2.fc22,hawkey-0.6.0-1.fc22
dnf-plugins-core-0.1.10-1.fc23, hawkey-0.6.0-1.fc23, dnf-1.1.0-2.fc23 has been submitted as an update for Fedora 23. https://admin.fedoraproject.org/updates/FEDORA-2015-13289/dnf-plugins-core-0.1.10-1.fc23,dnf-1.1.0-2.fc23,hawkey-0.6.0-1.fc23
Package dnf-plugins-core-0.1.10-1.fc22, hawkey-0.6.0-1.fc22, dnf-1.1.0-2.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.10-1.fc22 hawkey-0.6.0-1.fc22 dnf-1.1.0-2.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-13162/dnf-plugins-core-0.1.10-1.fc22,dnf-1.1.0-2.fc22,hawkey-0.6.0-1.fc22 then log in and leave karma (feedback).
dnf-plugins-core-0.1.10-1.fc22, hawkey-0.6.0-1.fc22, dnf-1.1.0-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
dnf-plugins-core-0.1.10-1.fc23, hawkey-0.6.0-1.fc23, dnf-1.1.0-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
We need this fix backported to f21 to enable us to turn on dnf for making rawhide buildroots see the buildlog for http://koji.fedoraproject.org/koji/taskinfo?taskID=10981031
Since you did it several times... Is this how it works in Fedora? I mean, if someone files a bug against Fedora 22 and if we fix it in Fedora 22, is it correct to reopen the bug later in order to get the fix backported to older Fedoras? Is it documented somewhere? Or is it a common practice?
We can not move the builders to Fedora 22 until we are sure that everything will work correctly with the change to dnf taking over yum on the system, and to ensure that we can use dnf to create buildroots in the system. it is common practice to reopen a bug if you hit the same issue on a different release. If you prefer I can try to remeber to open a new bug, or to clone the bug, normally we just reopen them though.
Ping, we need this update fairly urgently
I made sure my team mates will take a look.
Added to sprint. We'll backport it in the new f21 release of DNF.
dnf-0.6.4-7.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-9bcdcdc46b
I am sorry for a delay, but bodhi silently refused this update and I did not notice it.
dnf-0.6.4-7.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update dnf' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-9bcdcdc46b
dnf-0.6.4-7.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.