Bug 1038937 - [plugins] [api] Add hook for metadata download complete event
Summary: [plugins] [api] Add hook for metadata download complete event
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-06 08:19 UTC by Elad Alfassa
Modified: 2014-01-04 19:53 UTC (History)
4 users (show)

Fixed In Version: dnf-0.4.10-1.fc20
Clone Of:
Environment:
Last Closed: 2014-01-04 19:53:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Elad Alfassa 2013-12-06 08:19:19 UTC
I need a hook for metadata download complete event. See bug #1030440 for more info.

Note that it'd be better if that hook would fire after the entirety of the metadata from all repos is downloaded and processed, as opposed to once per repo.

Comment 1 Ales Kozumplik 2013-12-06 10:03:23 UTC
might end up being a hook after the sack ready or similar, but a reasonable hook nonetheless.

Comment 2 Ales Kozumplik 2013-12-17 08:19:59 UTC
Resolved by 3d3ad49 on the master branch. The hook will be available from dnf-0.4.10.

Comment 3 Fedora Update System 2014-01-02 10:10:05 UTC
dnf-0.4.10-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.10-1.fc20

Comment 4 Fedora Update System 2014-01-03 08:41:48 UTC
Package dnf-0.4.10-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.10-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0089/dnf-0.4.10-1.fc20
then log in and leave karma (feedback).

Comment 5 Elad Alfassa 2014-01-03 12:47:19 UTC
This is not what I had in mind. The way you implemented it means it runs every time I do search or install or anything like that, as opposed to when the metadata cache is created - which is when I wanted it to happen

Comment 6 Ales Kozumplik 2014-01-03 14:48:53 UTC
but that would have some odd semantics: especially given your requirement in comment 0, the repos are not necessarily synced at the same time given the different expiration periods.

I could add a hook like repo_refreshed('reponame') which would get triggered every time 'reponame' has fresh metadata downloaded. but for an initial implementation I think the sack() trigger should work too.

Comment 7 Elad Alfassa 2014-01-03 14:52:07 UTC
It will mean that until the user actually uses dnf the bash completion won't be able to complete available packages. I *really* hoped to be able to use the makecache timer for making sure the cache is relatively up-to-date...

Comment 8 Fedora Update System 2014-01-04 19:53:23 UTC
dnf-0.4.10-1.fc20 has been pushed to the Fedora 20 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.