Bug 1579792 - [modularity] Enabling different stream from installed profile does not erase profile info
Summary: [modularity] Enabling different stream from installed profile does not erase ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 28
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Hatina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1478068 1579800
TreeView+ depends on / blocked
 
Reported: 2018-05-18 10:44 UTC by Rafael Fonseca
Modified: 2018-07-24 13:50 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
: 1579800 (view as bug list)
Environment:
Last Closed: 2018-07-24 13:50:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rafael Fonseca 2018-05-18 10:44:05 UTC
Description of problem: In bug #1488089 it was fixed the issue when enabling another stream of a module with a profile installed, the profile info should be cleared. However, the issue persists if '--assumeyes' argument is used.


Version-Release number of selected component (if applicable): 2.7.5-12


How reproducible: always


Steps to Reproduce:
1. Enable some moduleA:streamS
2. Install a profileP
3. /etc/dnf/modules.d/moduleA.module contains
'profiles = profileP'
4. Run 'dnf module enable moduleA:streamT -y'

Actual results: /etc/dnf/modules.d/moduleA.module contains
'stream = streamT'
'profiles = profileP'


Expected results: profiles is empty


Additional info:
bash-4.4# dnf module enable ModuleA:f26
Last metadata expiration check: 0:00:43 ago on Fri May 18 10:39:42 2018.
'ModuleA:f26' is enabled
bash-4.4# dnf module install ModuleA/minimal
Last metadata expiration check: 0:00:53 ago on Fri May 18 10:39:42 2018.
Dependencies resolved.
========================================================================================================================================
 Package                      Arch                          Version                         Repository                             Size
========================================================================================================================================
Downgrading:
 TestA                        noarch                        1-2.modA                        modularityABDE                        6.4 k

Transaction Summary
========================================================================================================================================
Downgrade  1 Package

Total size: 6.4 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1 
  Downgrading      : TestA-1-2.modA.noarch                                                                                          1/2 
  Erasing          : TestA-2-1.modA.noarch                                                                                          2/2 
  Verifying        : TestA-1-2.modA.noarch                                                                                          1/2 
  Verifying        : TestA-2-1.modA.noarch                                                                                          2/2 

Downgraded:
  TestA.noarch 1-2.modA                                                                                                                 

Complete!
bash-4.4# cat /etc/dnf/modules.d/ModuleA.module 
[ModuleA]
name = ModuleA
stream = f26
version = 2
profiles =minimal
enabled = 1
locked = 0

bash-4.4# dnf module enable ModuleA:f27 -y
Last metadata expiration check: 0:01:20 ago on Fri May 18 10:39:42 2018.
'ModuleA:f27' is enabled
bash-4.4# cat /etc/dnf/modules.d/ModuleA.module 
[ModuleA]
name = ModuleA
stream = f27
version = 2
profiles =minimal
enabled = 1
locked = 0

bash-4.4# dnf module enable ModuleA:f26
Last metadata expiration check: 0:02:43 ago on Fri May 18 10:39:42 2018.
Enabling different stream for 'ModuleA'.
Is this ok [y/N]: y
'ModuleA:f26' is enabled
bash-4.4# cat /etc/dnf/modules.d/ModuleA.module 
[ModuleA]
name = ModuleA
stream = f26
version = -1
profiles =
enabled = 1
locked = 0


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