Bug 1071323

Summary: [api] [rfe]: dnf.repo & dnf.repodict API extention
Product: [Fedora] Fedora Reporter: Tim Lauridsen <tim.lauridsen>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, jzeleny, pnemade, rholy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.4.17-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-08 03:35:35 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: 1066869    

Description Tim Lauridsen 2014-02-28 13:39:37 UTC
Description of problem:

The follow methods/properties would be nice to have as public API

class dnf.repodict.RepoDict:

  'all' property to get access to all repositories.

  'get_multiple(filter)' to get a list of repositories mathing a wildcard

class dnf.repo.Repo:

  'set_progress_bar(progress)' to set a progress callback to loading repo metadata

Version-Release number of selected component (if applicable):
0.4.16

Additional info:

Here is an example of how to use the repotory releated API:

https://github.com/timlau/dnf-apiex/blob/master/dnf-repo.py

Comment 1 Radek Holy 2014-02-28 15:13:28 UTC
Yes, something like that can really come in handy. Thank you, we'll take a look at it.

Comment 2 Ales Kozumplik 2014-03-04 10:56:09 UTC
Tim, the requested API is ready in 311004d.

Comment 3 Ales Kozumplik 2014-03-04 10:57:26 UTC
BTW, all() is now a parameter-less method, not a property, so it acts the same as dict.values().

Comment 4 Tim Lauridsen 2014-03-04 11:42:50 UTC
Thanks, get_matching is a much better name :)

Comment 5 Fedora Update System 2014-03-05 12:57:31 UTC
dnf-0.4.17-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.17-1.fc20

Comment 6 Fedora Update System 2014-03-06 08:14:20 UTC
Package dnf-0.4.17-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.17-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-3465/dnf-0.4.17-1.fc20
then log in and leave karma (feedback).

Comment 7 Tim Lauridsen 2014-03-07 07:55:26 UTC
works fine, thanks

Comment 8 Fedora Update System 2014-03-08 03:35:35 UTC
dnf-0.4.17-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.