Bug 1581621 - [modularity] Removing a profile should not remove packages needed by other profiles
Summary: [modularity] Removing a profile should not remove packages needed by other pr...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1478068 1581624
TreeView+ depends on / blocked
 
Reported: 2018-05-23 09:00 UTC by Rafael Fonseca
Modified: 2018-11-22 18:13 UTC (History)
5 users (show)

Fixed In Version: dnf-4.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1581624 (view as bug list)
Environment:
Last Closed: 2018-11-22 18:13:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rafael Fonseca 2018-05-23 09:00:09 UTC
Description of problem: if two profiles of a module contain the same package, removing one of the profiles should not remove the common package.


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


How reproducible: always


Steps to Reproduce:
1. 
      ---     
      document: modulemd
      version: 2
      data:                                                                                                            
        name: ModuleA
        stream: f26                                                                                                    
        version: 2
        summary: Module ModuleA summary                                                                                
        description: Module ModuleA description
        license:
          module: [MIT]   
        artifacts:
          rpms: ["TestA-0:1-2.modA.noarch", "TestB-0:1-1.modA.noarch", "TestC-0:1-2.modA.noarch", "TestD-0:1-1.modA.noarch"]      
        components:
          rpms: 
            TestA: {rationale: 'rationale for TestA'}                                                                  
            TestB: {rationale: 'rationale for TestB'}                                                                  
            TestC: {rationale: 'rationale for TestC'}                                                                  
            TestD: {rationale: 'rationale for TestD'}
        profiles: 
          default:
            rpms: [TestA, TestB, TestC]                                                                                
          minimal:
            rpms: [TestA]
          client: 
            rpms: [TestA, TestB]
          server: 
            rpms: [TestA, TestC]
          devel:
            rpms: [TestD]  
      ---       
2. dnf module enable ModuleA:f26
3. dnf module install ModuleA/minimal ModuleA/client
4. dnf module remove ModuleA/minimal

Actual results: 
Last metadata expiration check: 0:00:04 ago on Wed May 23 08:54:10 2018.
      Dependencies resolved.
      ================================================================================
       Package       Arch           Version             Repository               Size
      ================================================================================
      Removing:
       TestA         noarch         1-2.modA            @modularityABDE           0  
      
      Transaction Summary
      ================================================================================
      Remove  1 Package
      
      Freed space: 0  
      Running transaction check
      Transaction check succeeded.
      Running transaction test
      Transaction test succeeded.
      Running transaction
        Preparing        :                                                        1/1 
        Erasing          : TestA-1-2.modA.noarch                                  1/1 
        Verifying        : TestA-1-2.modA.noarch                                  1/1 
      
      Removed:
        TestA.noarch 1-2.modA                                                         


Expected results: package is not removed since it's needed by ModuleA/client


Additional info:

Comment 2 Jan Kurik 2018-08-14 11:14:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.


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