Re: Tips to add optional arguments on dnf using plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Each DNF command could have static method set_argparser (here is the
example from reposync plugin:
https://github.com/rpm-software-management/dnf-plugins-core/blob/master/plugins/reposync.py#L60)
which can be used for adding command specific arguments. However there
is no such method for adding global arguments.
May I ask you to elaborate your use case in more details? What are you
trying to achieve?

Regards,

Marek

--
Marek Blaha <mblaha@xxxxxxxxxx>

Red Hat Czech s.r.o.
Software Engineer

On Mon, Jul 22, 2019 at 7:59 PM Fellipe Henrique <fellipeh@xxxxxxxxx> wrote:
>
> Hello,
>
> First of all, thanks for accept me on these mail list.. my first mail it's about a issue I facing here on my job...
>
> I need to add some optional arguments on dnf,  not a command, just a "global" args.. eg:  $ dnf repolist --my_arg=abcd
>
> How can I do these? Can I use plugin with these approach?
>
> I already try to override OptionParser from cli inside Plugin class, no success... I try just parse cli args, but dnf still says my argument if not recognized..
>
> Anyone, have any tips how to do that?
>
> Best regards,
>
> T.·.F.·.A.·.     S+F
> Fellipe Henrique P. Soares
>
> e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
> Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
> Blog: http:www.fellipeh.eti.br
> GitHub: https://github.com/fellipeh
> Twitter: @fh_bash
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux