Bug 1581157 - [modularity] Updating a module does not remove obsolete packages
Summary: [modularity] Updating a module does not remove obsolete packages
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1478068 1581235
TreeView+ depends on / blocked
 
Reported: 2018-05-22 09:10 UTC by Rafael Fonseca
Modified: 2018-05-28 11:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1581235 (view as bug list)
Environment:
Last Closed: 2018-05-28 11:25:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Rafael Fonseca 2018-05-22 09:10:42 UTC
Description of problem: Let's say you installed version 1 of ModuleB with rpms: TestG and TestH. Then you update it to version 2 which has rpms TestG and TestI. TestH is not removed.


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


How reproducible: always


Steps to Reproduce:
1.
        ---     
        document: modulemd 
        version: 2
        data:   
          artifacts:
            rpms: ["TestG-0:1-1.modB.noarch", "TestH-0:1-1.modB.noarch"]                                               
          components:
            rpms: 
              TestG: {rationale: 'rationale for TestG'}                                                                
              TestH: {rationale: 'rationale for TestH'}                                                                
          description: Module ModuleB description                                                                      
          license:
            module: [MIT]
          name: ModuleB
          profiles: 
            default:
              rpms: [TestG, TestH] 
          stream: f26
          summary: Module ModuleB summary                                                                              
          version: 1
        ---   
        data:   
          artifacts:
            rpms: ["TestG-0:1-2.modB.noarch", "TestI-0:1-1.modB.noarch"]                                               
          components:
            rpms: 
              TestG: {rationale: 'rationale for TestG'}                                                                
              TestI: {rationale: 'rationale for TestI'}                                                                
          description: Module ModuleB description                                                                      
          license:
            module: [MIT]
          name: ModuleB                                                                                                
          profiles:                                                                                                    
            default:
              rpms: [TestG, TestI]
          stream: f26
          summary: Module ModuleB summary                                                                              
          version: 2
        document: modulemd 
        version: 2

2. Install ModuleB:f26:1
3. Update ModuleB

Actual results: TestH is kept in the system


Expected results: TestH is removed
        rpmdb changes are 
          | State     | Packages       |
          | upgraded  | TestG/1-2.modB |
          | removed   | TestH/1-1.modB |
          | installed | TestI/1-1.modB |


Additional info:

Comment 1 Daniel Mach 2018-05-28 11:25:02 UTC
Module version doesn't obsolete older module versions.
DNF merges NEVRAs from all existing module versions within a stream and let depsolver to pick the best versions.
If an RPM is supposed to be obsoleted, another RPM has to obsolete as usual.


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