Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1780617 - [RFE]: dnf module: Add "dnf module swap" and "dnf module enable --allowswapping" functionality
Summary: [RFE]: dnf module: Add "dnf module swap" and "dnf module enable --allowswappi...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: dnf-community
TreeView+ depends on / blocked
 
Reported: 2019-12-06 14:19 UTC by Neal Gompa
Modified: 2021-02-16 04:31 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-03 10:47:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Neal Gompa 2019-12-06 14:19:20 UTC
Description of problem:
When doing layered OS image builds programmatically (with a tool like KIWI, buildah, etc.), it's basically impossible to enable modules and simultaneously tell DNF to do everything necessary to enable it (switch streams, deal with modular dependency conflicts, etc.).

This makes it impossible for layered image builds where you don't have control of what the base layer has enabled to work.

Thus, I propose that the following be added to "dnf module" to support this:
* "dnf module swap <moduleA> <moduleB>"
* "dnf module enable --allowswapping moduleC"

These two commands would allow for explicit user switching of modular content, but would also imply a distro-sync action to ensure all the modular RPM content is swapped over accordingly. If something were to become unresolvable or disappear entirely, then an --allowerasing flag could be set by the user in the same way that we do for non-modular content to allow that too.

This would make it possible for KIWI to implement layered image builds properly, as this is a missing function that makes us struggle in supporting modular content in KIWI itself.

Version-Release number of selected component (if applicable):
4.2.17-1.fc32

Comment 1 Neal Gompa 2019-12-06 14:20:57 UTC
I would also like a way to do this via the API for livecd-tools to implement handling modular content too.

Comment 2 Jaroslav Mracek 2020-11-13 14:35:28 UTC
I am sorry, but I don't like when someone is asking two requests in one bugzilla. It makes a difficulty in tracking.

I suggest that the first part (module switch) is handled by PR https://github.com/rpm-software-management/dnf/pull/1685.

(In reply to Neal Gompa from comment #1)
> I would also like a way to do this via the API for livecd-tools to implement
> handling modular content too.

Please could you be more specific like for which languages (Python or C) and what kind of handling you requires (enable, reset, disable, ...)?

Comment 3 Jaroslav Mracek 2020-12-03 10:47:16 UTC
Bot requests are resolved in upstream. See https://github.com/rpm-software-management/dnf/pull/1685. I am closing it because the release will not trigger close of the bug, because the bug was not mentioned in commit message.

Comment 4 Neal Gompa 2021-02-16 04:31:01 UTC
(In reply to Jaroslav Mracek from comment #2)
> I am sorry, but I don't like when someone is asking two requests in one
> bugzilla. It makes a difficulty in tracking.
> 
> I suggest that the first part (module switch) is handled by PR
> https://github.com/rpm-software-management/dnf/pull/1685.
> 
> (In reply to Neal Gompa from comment #1)
> > I would also like a way to do this via the API for livecd-tools to implement
> > handling modular content too.
> 
> Please could you be more specific like for which languages (Python or C) and
> what kind of handling you requires (enable, reset, disable, ...)?

Basically those three actions, but at least at a minimum enough to implement module kickstart command for livecd-tools.


Note You need to log in before you can comment on or make changes to this bug.