Bug 1243005 - Query.filter(provides=XXX) fails for lists
Summary: Query.filter(provides=XXX) fails for lists
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hawkey
Version: 22
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1231572
TreeView+ depends on / blocked
 
Reported: 2015-07-14 14:33 UTC by Michael Mráka
Modified: 2015-10-05 21:52 UTC (History)
7 users (show)

Fixed In Version: hawkey-0.6.1-2.fc23 hawkey-0.6.1-2.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-04 19:13:10 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1243002 None None None Never

Internal Links: 1243002

Description Michael Mráka 2015-07-14 14:33:32 UTC
Description of problem:
>>> len(q.filter(provides='/bin/sh'))
3
>>> len(q.filter(providess=['/bin/sh']))
Traceback (most recent call last):
  File "/tmp/r.py", line 12, in <module>
    print len(q.filter(provides=['/bin/sh','/bin/sh']))
  File "/usr/lib64/python2.7/site-packages/hawkey/__init__.py", line 295, in filter
    return new_query.filterm(*lst, **kwargs)
  File "/usr/lib64/python2.7/site-packages/hawkey/__init__.py", line 301, in filterm
    super(Query, self).filter(*arg_tuple)
TypeError: Expected a Reldep object.


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:
always

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(provides='/bin/sh'))
print len(q.filter(provides=['/bin/sh']))
EOF
2. python /tmp/r.py


Actual results:
3
Traceback (most recent call last):
  File "/tmp/r.py", line 12, in <module>
    print len(q.filter(provides=['/bin/sh','/bin/sh']))
  File "/usr/lib64/python2.7/site-packages/hawkey/__init__.py", line 295, in filter
    return new_query.filterm(*lst, **kwargs)
  File "/usr/lib64/python2.7/site-packages/hawkey/__init__.py", line 301, in filterm
    super(Query, self).filter(*arg_tuple)
TypeError: Expected a Reldep object.


Expected results:
3
3

Additional info:

Comment 1 Radek Holy 2015-07-15 07:06:47 UTC
Well, it shouldn't work so far. Let's track this as an RFE.

Comment 2 Michael Mráka 2015-07-15 07:49:49 UTC
If list in filter works for other options (arch, file, name, release, version, ...) then it's a bug not RFE.

Comment 3 Honza Silhan 2015-07-29 14:27:46 UTC
We should either document Reldep object or do the implicit conversion from string.

Comment 5 Valentina Mukhamedzhanova 2015-09-11 17:12:24 UTC
https://github.com/rpm-software-management/hawkey/pull/108

Comment 6 Fedora Update System 2015-09-22 15:01:48 UTC
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

Comment 7 Fedora Update System 2015-09-22 15:03:34 UTC
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

Comment 8 Fedora Update System 2015-09-23 03:55:03 UTC
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

Comment 9 Fedora Update System 2015-09-23 21:22:53 UTC
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

Comment 10 Fedora Update System 2015-10-02 15:19:26 UTC
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

Comment 11 Fedora Update System 2015-10-02 15:23:57 UTC
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

Comment 12 Fedora Update System 2015-10-04 01:35:39 UTC
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

Comment 13 Fedora Update System 2015-10-04 01:51:34 UTC
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

Comment 14 Fedora Update System 2015-10-04 19:12:25 UTC
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.

Comment 15 Fedora Update System 2015-10-05 21:51:53 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.