Bug 1568153 - [modularity] removing a module should disable it, even if there's nothing to do
Summary: [modularity] removing a module should disable it, even if there's nothing to do
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1478068
TreeView+ depends on / blocked
 
Reported: 2018-04-16 21:02 UTC by Merlin Mathesius
Modified: 2018-04-23 11:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-23 11:22:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Merlin Mathesius 2018-04-16 21:02:17 UTC
Description of problem:
Removing a module with "dnf module remove" doesn't disable it. It should be disabled, even if there are no installed RPMs.

This is rather unexpected. You could end up with new RPMs on your system as the module that you thought you removed gets updates and its selected profile grows.


Version-Release number of selected component (if applicable):
dnf-2.7.5-19.fc28.modularity.1.3fb9e5c.git.8118.7bc81fe.noarch


How reproducible:
always


Steps to Reproduce:
1. fresh container based on docker.io/fedora:28 (or other current F28 VM/container) with latest F28 updates, fedora-repos-modular enabled, and latest patched dnf from COPR
2. dnf module list --enabled # nothing enabled
3. dnf -y module install nodejs:8/minimal
4. dnf module list --enabled # confirmed enabled
5. dnf -y module remove nodejs # Error: Different stream enabled for module: nodejs
6. dnf module list --enabled # still enabled
7. dnf -y module remove nodejs:8 # removed now
8. dnf module list --enabled # nodejs:8 still enabled?
9. dnf list --installed 'nodejs*' npm # confirmed no module packages still installed


Actual results:
At step 5, failed with Error: Different stream enabled for module: nodejs
At step 8, removed nodejs:8 was still enabled


Expected results:
At step 5, enabled stream nodejs:8 should have been removed
Step 7 should not have been needed
At step 8, no modules should have been enabled


Additional info:
If the Steps to Reproduce above is modified by also running "dnf -y remove nodejs npm" immediately after step 4 (to remove all packages installed by step 3), the module should still be disabled when it is explicitly removed in subsequent steps.

Comment 2 Daniel Mach 2018-04-23 11:22:57 UTC
I believe we discussed this with broader audience and the conclusion was not to disable modules with remove command.
DNF team supports the conclusion.
We want to do it also for UX consistency.
- When a user specifies N:S to install, it gets expanded with default profiles or 'default' profile; There's no opposite for remove.


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