[Rpm-ecosystem] DNF module for Ansible rewrite

Honza Šilhan jsilhan at redhat.com
Wed Jul 8 08:36:06 UTC 2015


> From: "Pavel Odvody" <podvody at redhat.com>
> Hey,
> 
> at [1] is a re-implementation of the DNF module for Ansible using
> exclusively DNF's APIs.
> I have one question though, in the original code there was this [2],
> which seems to try to search outstanding transactions for those
> involving the specified packages; does that even make sense to try to do
> this? First it feels like bypassing the DNF API in the first place,
> second since there's no way to resolve the issue through Ansible/DNF
> alone the error message will be particularly unhelpful.
> 
> I've tested the code with basic commands and playbooks so I'd appreciate
> if anyone could help me with testing this :)
> 
> [1]:
> https://github.com/shaded-enmity/ansible-modules-extras/blob/SE/dnf/packaging/os/dnf.py
> [2]:
> https://github.com/ansible/ansible-modules-extras/blob/devel/packaging/os/dnf.py#L349
> 

Hi,

DNF doesn't have any `find_unfinished_transactions` method. Looking at DNF code,
we actually store `transaction-all*` and `transaction-done*` transaction logs but
currently you cannot get the information from them the legal way (through API).
You'd better leave this part of code in ansible module if it's not needed.
Once it becomes important feel free to file RFE for DNF component.

Honza


More information about the Rpm-ecosystem mailing list