#1631 Ability to disable modules in the buildroot
Closed: Fixed 3 years ago by praiskup. Opened 3 years ago by frostyx.

Currently, we support only enabling modules in the buildroot. It was
requested to have the ability to disable modules as well.

We should utilize mock config option module_setup_commands, e.g.

config_opts['module_setup_commands'] = [
    ('disable', 'postgresql'),
    ('enable',  'postgresql:12, ruby:2.6'),
    ('install', 'nodejs:13/development'),
    ('disable', 'nodejs'),
]

At this moment, we use module_enable for enabling modules. Ideally, we should unify it and use module_setup_commands for everything.


in epel-8-x86_64 the virt module (AppStream) is blocking my attempt to build libvirt and qemu-system-x86 with Build-Requires on Xen and its libs.

I need to disable the virt module for a Copr build, before I start.
I looked into using some mock-config line to do this in Copr, without any luck.

mockbuild@c80pv:~$ cat /etc/dnf/modules.d/virt.module
[virt]
name=virt
profiles=
state=disabled
stream=

Same for me. I am working on Uyuni development (fork of Spacewalk) for RHEL. The modules rhn-tools and satellite-5-client hinder building required packages (i.e. mgr-push, python3-mgr-push and spacewalk-backend alternative requirements cannot be installed).

At this moment, we use module_enable

From what I remember we had module_toggle config option?

From what I remember we had module_toggle config option?

I totally missed that, thank you @praiskup.
It is really confusing because we have some module_enable internals in the code but the Enable module: option in chroot settings isn't bound to module_enable but rather module_toggle.

Also, while setting foo:bar generates

'modules': {'toggle': [{'enable': 'foo:bar'}]},

in our build config, setting !foo:bar does nothing. We still have

@skip("Modules disable not implemented yet.")

in our tests, so the module disabling might not be implemented yet.

module disabling might not be implemented yet.

Pitty, sorry I now recall that at the time @thrnciar worked on the feature
I was sure this feature will be needed but we eventually didn't finish this.

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #1654 Merged 3 years ago