Description of problem: dnf download ruby193 --source Okay, ruby193 wasn't in the repo, but it should do something better than give a traceback. Version-Release number of selected component: dnf-0.5.4-2.fc20 Additional info: reporter: libreport-2.2.3 cmdline: /usr/bin/python -OO /usr/bin/dnf download ruby193 --source dso_list: dnf-plugins-core-0.1.1-3.fc20.noarch executable: /usr/bin/dnf kernel: 3.16.2-200.fc20.x86_64 runlevel: N 5 type: Python uid: 8270 Truncated backtrace: download.py:181:_get_query_source:TypeError: 'NoneType' object has no attribute '__getitem__' Traceback (most recent call last): File "/usr/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 200, in user_main errcode = main(args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 83, in main return _main(base, args) File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 133, in _main cli.run() File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1171, in run return self.command.run(self.base.extcmds) File "/usr/lib/python2.7/site-packages/dnf-plugins/download.py", line 84, in run locations = self._download_source(self.opts.packages) File "/usr/lib/python2.7/site-packages/dnf-plugins/download.py", line 111, in _download_source pkgs = self._get_packages(source_pkgs, source=True) File "/usr/lib/python2.7/site-packages/dnf-plugins/download.py", line 119, in _get_packages queries = map(self._get_query_source, pkg_specs) File "/usr/lib/python2.7/site-packages/dnf-plugins/download.py", line 181, in _get_query_source pkg_spec = pkg_spec[:-4] # skip the .rpm TypeError: 'NoneType' object has no attribute '__getitem__' Local variables in innermost frame: pkg_spec: None self: <dnf.plugin.dynamic.download.DownloadCommand object at 0x1e61410>
Created attachment 938869 [details] File: backtrace
Created attachment 938870 [details] File: environ
I think there is no such traceback on Fedora 21. I tried to reproduce this as $ sudo dnf download ruby193 --source enabled fedora-source repository Fedora 21 - Source 225 kB/s | 5.4 MB 00:24 and no output as it didn't find srpm ruby193
I haven't reproduced it either - no traceback in f20 with the same packages as reporter. Do you know what's going on, Tim? Would you mind taking it, please?
I will take a look
Look a little strange, this will only happen if no sourcerpm is defined for a given package. I have made a fix, so the plugin don't traceback in this case https://github.com/rpm-software-management/dnf-plugins-core/pull/43
Thanks.
Thanks, Tim.
dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21
Package dnf-0.6.3-2.fc21, hawkey-0.5.2-1.fc21, dnf-plugins-core-0.1.4-1.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dnf-0.6.3-2.fc21 hawkey-0.5.2-1.fc21 dnf-plugins-core-0.1.4-1.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-16760/dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21 then log in and leave karma (feedback).
dnf-0.6.3-2.fc21, hawkey-0.5.2-1.fc21, dnf-plugins-core-0.1.4-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.