[Rpm-ecosystem] DNF module for Ansible rewrite

Pavel Odvody podvody at redhat.com
Fri Jul 10 11:48:36 UTC 2015


On Thu, 2015-07-09 at 21:13 +0000, Igor Gnatenko wrote:
> There are my PR with initial support with DNF:
> https://github.com/ansible/ansible-modules-extras/pull/527
> 
> 
> Contributions are welcome ;)
> 

Yeah, the problem I had with that was that the code was a mixture of
command-line (DNF, repoquery) and API (DNF) functionality, so I started
from scratch and only with the Python APIs.

I'm currently testing my code against some random playbooks, and I'm
probably going to send a PR later today. Igor, would you consider
closing the original PR, and move forward from my branch? 

> 
> On Wed, Jul 8, 2015 at 11:36 AM Honza Šilhan <jsilhan at redhat.com>
> wrote:
> 
>         > 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
>         _______________________________________________
>         Rpm-ecosystem mailing list
>         Rpm-ecosystem at lists.rpm.org
>         http://lists.rpm.org/mailman/listinfo/rpm-ecosystem
> -- 
> 
> -Igor Gnatenko
> 
> _______________________________________________
> Rpm-ecosystem mailing list
> Rpm-ecosystem at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-ecosystem


-- 
Pavel Odvody <podvody at redhat.com>
Software Engineer - EMEA ENG Developer Experience
5EC1 95C1 8E08 5BD9 9BBF 9241 3AFA 3A66 024F F68D
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.rpm.org/pipermail/rpm-ecosystem/attachments/20150710/f9a525fd/attachment.asc>


More information about the Rpm-ecosystem mailing list