Bug 1173027 - [rel-eng] query.filter() - glob exclusions
Summary: [rel-eng] query.filter() - glob exclusions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hawkey
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1080837
TreeView+ depends on / blocked
 
Reported: 2014-12-11 10:28 UTC by Daniel Mach
Modified: 2015-02-20 08:32 UTC (History)
4 users (show)

Fixed In Version: hawkey-0.5.3-2.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-20 08:32:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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