Description of problem: >>> len(q.filter(requires='/bin/sh')) 11012 >>> len(q.filter(requires=['/bin/sh'])) 0 >>> len(q.filter(requires=['/bin/sh','/bin/sh'])) Segmentation fault (core dumped) Version-Release number of selected component (if applicable): dnf-1.0.1-2.fc22.noarch hawkey-0.5.7-1.fc22.x86_64 How reproducible: 8/10 runs Steps to Reproduce: 1. cat <<EOF >/tmp/r.py import dnf b = dnf.Base() b.read_all_repos() b.fill_sack() q=b.sack.query() print len(q.filter(requires='/bin/sh')) print len(q.filter(requires=['/bin/sh'])) print len(q.filter(requires=['/bin/sh','/bin/sh'])) EOF 2. python /tmp/r.py Actual results: 11012 0 Segmentation fault (core dumped) Expected results: 111012 111012 111012 Additional info:
Well, it shouldn't work so far. Let's track this as an RFE.
Hm, the "requires" filter is missing at all so far.
What does exactly mean "is missing at all"? It's implemented and works (for simple case): >>> len(q.filter(requires='/bin/sh')) 11012 It's documented: http://dnf.readthedocs.org/en/latest/api_queries.html#dnf.query.Query.filter
No, it isn't documented.
If something segfaults it's bug not RFE. And similarly if list in filter works for other options (arch, file, name, release, version, ...) then it's a bug not FRE.
(In reply to Radek Holy from comment #4) > No, it isn't documented. This is not an answer for What does exactly mean "is missing at all"?
OK, I'm not going to repeat in every every discussion with you. That's the last time I repeat it. The documentation is the only resource you should consult in order to find out if something *should* work. The fact that something works does not mean that it is a feature nor even that it should work. If you take a look into the documentation, you find out that there is nothing about a support of "requires" nor lists as arguments. This means that you simply cannot say, that it's a bug that a function behaves unexpectedly if you use it in an unexpected way. (The fact, that ".filter(requires=some_list)" is used in many places simply means that the authors use DNF wrong. Nothing more, nothing less. The only exception is DNF where we can use undocumented features of course.)
We have it documented in some of the PR which will be merged soon.
https://github.com/rpm-software-management/hawkey/pull/108
hawkey-0.6.1-1.fc23 dnf-plugins-core-0.1.12-2.fc23 dnf-1.1.2-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16428
dnf-plugins-core-0.1.12-2.fc22 hawkey-0.6.1-1.fc22 dnf-1.1.2-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16429
dnf-1.1.2-2.fc23, dnf-plugins-core-0.1.12-2.fc23, hawkey-0.6.1-1.fc23 has been pushed to the Fedora 23 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-plugins-core dnf hawkey' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16428
dnf-1.1.2-2.fc22, dnf-plugins-core-0.1.12-2.fc22, hawkey-0.6.1-1.fc22 has been pushed to the Fedora 22 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-plugins-core dnf hawkey' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16429
dnf-plugins-core-0.1.12-3.fc23 hawkey-0.6.1-2.fc23 dnf-1.1.2-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-38e69423f3
dnf-plugins-core-0.1.12-3.fc22 hawkey-0.6.1-2.fc22 dnf-1.1.2-4.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3528c659e4
dnf-1.1.2-4.fc22, dnf-plugins-core-0.1.12-3.fc22, hawkey-0.6.1-2.fc22 has been pushed to the Fedora 22 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 hawkey dnf-plugins-core dnf' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-3528c659e4
dnf-1.1.2-4.fc23, dnf-plugins-core-0.1.12-3.fc23, hawkey-0.6.1-2.fc23 has been pushed to the Fedora 23 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 hawkey dnf-plugins-core dnf' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-38e69423f3
dnf-1.1.2-4.fc23, dnf-plugins-core-0.1.12-3.fc23, hawkey-0.6.1-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
dnf-1.1.2-4.fc22, dnf-plugins-core-0.1.12-3.fc22, hawkey-0.6.1-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.