Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1173027

Summary: [rel-eng] query.filter() - glob exclusions
Product: [Fedora] Fedora Reporter: Daniel Mach <dmach>
Component: hawkeyAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, jsilhan, mluscon, rholy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hawkey-0.5.3-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-20 08:32:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1080837    

Description Daniel Mach 2014-12-11 10:28:24 UTC
I'd like to make a query for all binary packages in a repo.
This means excluding source arches and packages with debuginfo in their names.

The query could look like this:
q.filter(name__glob__neq=["*-debuginfo", "*-debuginfo-*"], arch__neq=["src", "nosrc"])
or
q.exclude(name__glob=["*-debuginfo", "*-debuginfo-*"]).filter(arch__neq=["src", "nosrc"])


Could you extend hawkey filters to support exclusions via globs?

Comment 1 Honza Silhan 2014-12-19 12:15:23 UTC
multiple support for queries in PR (https://github.com/rpm-software-management/hawkey/pull/75) with following syntax:

q.filter(name__glob__not=["*-debuginfo", "*-debuginfo-*"], arch__neq=["src", "nosrc"])

Comment 2 Fedora Update System 2015-02-16 00:03:08 UTC
dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21

Comment 3 Fedora Update System 2015-02-17 08:04:02 UTC
Package hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.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 hawkey-0.5.3-2.fc21 dnf-plugins-core-0.1.5-1.fc21 dnf-0.6.4-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2139/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-02-20 08:32:19 UTC
hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.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.