Bug 1561320

Summary: [modularity] dnf module remove should remove everything from the module
Product: [Fedora] Fedora Reporter: Remi Collet <rcollet>
Component: dnfAssignee: rpm-software-management
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dmach, mhatina, mmathesi, packaging-team-maint, psabata, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 11:19:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1478068    

Description Remi Collet 2018-03-28 06:01:43 UTC
Reproducer

# install a module
dnf module install foo
# install some optional package from the module
dnf install bar
# remove the module
dnf module remove foo

Everything from the module should be removed.
For now some packages from the module are not removed.

Comment 1 Petr Šabata 2018-03-28 07:32:30 UTC
I would keep packages that are also part of other enabled (explicitly or by default) modules if some of those RPMs were shared.

Comment 2 Martin Hatina 2018-03-28 11:19:03 UTC
According to reproducer dnf installs foo:default_stream/default_profile, and removes foo:default_stream/default_profile, not whole stream (every installed profile from the stream). Also it doesn't remove rpm, which was explicitly installed by user (bar in reproducer). This is expected behaviour.

Comment 3 Petr Šabata 2018-03-28 11:30:51 UTC
To me the expected behavior would be removing all RPMs owned by that module (unless they're also owned by something else, as noted in comment #1), no matter whether they were installed via a profile or by their name.

Comment 4 Remi Collet 2018-03-28 11:37:29 UTC
(In reply to Petr Šabata from comment #3)
> To me the expected behavior would be removing all RPMs owned by that module
> (unless they're also owned by something else, as noted in comment #1), no
> matter whether they were installed via a profile or by their name.

+1

(In reply to Martin Hatina from comment #2)
> This is expected behaviour.

This is terribly confusing for users.