So,
Using dnf plugin, I can't do that, if I understand correctly... As I said on my last email, I have these coded using yum, like these:
def init_hook(pc):
'''Initial Hook that configures the repositories'''
parser = pc.getOptParser()
if parser:
parser.add_option('', '--set-repository-layer',
dest='set_repository_layer',
action="" nargs=1)
def init_hook(pc):
'''Initial Hook that configures the repositories'''
parser = pc.getOptParser()
if parser:
parser.add_option('', '--set-repository-layer',
dest='set_repository_layer',
action="" nargs=1)
But, I can't do these using a new plugin approach on dnf, only if I use command... but command doesn't work with all dnf commands( repolist, install, remove etc..)
Maybe I need to change my approach, as you said @Nicolas
Cheers!
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
On Tue, Jul 23, 2019 at 8:11 AM Nicolas Mailhot <nicolas.mailhot@xxxxxxxxx> wrote:
Le 2019-07-23 12:01, Fellipe Henrique a écrit :
Hi
> First, Thanks very much for you reply...
>
> I need to add a "global" argument so I can change the layer of a
> repository... For example:
>
> $ dnf repolist --set-layer=mylayer
> $ dnf install -y any_repo --set-layer=mylayer
On our setup we approximate this via <layer>-repo naming
So dnf commands become dnf --disablerepo * --enablerepo <layer>-*
Tried to play with passing yum/dnf explicit config paths, that didn’t
work out so well. (I’ve seen others try to switch personalities via YUMx
variables, the result is also quite user unfriendly).
Of course that’s some pretty big hammer and that disables the ability to
preset repos to on or off within a layer. It would be much nicer if
there was a way to define things as part of a configuration set in
/etc/yum*, and enable/disable specific configuration sets on the cli.
One use case is reposync, since one typically wants the system to use
the remote repos once synced, so every repo has one personality for
reposync, and another for the system dnf itself.
Regards,
--
Nicolas Mailhot
_______________________________________________ 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