Bug 1755005 - dnf module: A switched stream does not have "[i]" even when the RPMs are installed.
Summary: dnf module: A switched stream does not have "[i]" even when the RPMs are inst...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-24 14:13 UTC by Jun Aruga
Modified: 2019-09-27 11:40 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-27 09:12:19 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Fedora Pagure modularity issue 155 None None None 2019-09-24 14:13:35 UTC

Description Jun Aruga 2019-09-24 14:13:36 UTC
Description of problem:

On Fedora 31 container, seeing "dnf module list ruby",

1. After "dnf module install ruby:2.5", the 2.5 stream has "[e]" and "[i]".
2. Then after "dnf module enable ruby:2.6" the "2.6" stream has "[e]".
3. But after running "dnf distro-sync" to install RPMs in ruby:2.6 module, the ruby "2.6" stream does not have "[i]" even when "ruby:2.6" is actually installed. This is not intuitive. Is it intentional? Is there a way to see "[i]" for ruby:2.6 stream?

This report is originally from https://pagure.io/modularity/issue/155 .


Version-Release number of selected component (if applicable):
# rpm -q dnf
dnf-4.2.9-1.fc31.noarch
(Maybe, I did not record it when I faced the issue).

How reproducible:


Steps to Reproduce:
1. $ podman run --rm -it fedora:31 bash
2. # dnf module install ruby:2.5
3. # dnf module reset ruby
4. # dnf module enable ruby:2.6
5. # dnf distro-sync
6. Run following command to check ruby:2.6's ruby RPM is installed.

# rpm -q ruby
ruby-2.6.3-120.module_f31+4421+40d78b82.x86_64

7. dnf module list ruby


Actual results:

```
Last metadata expiration check: 0:00:15 ago on Fri Sep 20 13:47:02 2019.
Fedora Modular 31 - x86_64
Name      Stream      Profiles        Summary                                                 
ruby      master      default         An interpreter of object-oriented scripting language    
ruby      2.5         default [d]     An interpreter of object-oriented scripting language    
ruby      2.6 [e]     default [d]     An interpreter of object-oriented scripting language    

Fedora Modular 31 - x86_64 - Test Updates
Name      Stream      Profiles        Summary                                                 
ruby      master      default         An interpreter of object-oriented scripting language    
ruby      2.5         default [d]     An interpreter of object-oriented scripting language    
ruby      2.6 [e]     default [d]     An interpreter of object-oriented scripting language    

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
```

Expected results:


The 2.6 module stream should be outputted like this with "[i]".

```
ruby     2.6 [e]    default [d] [i]    An interpreter of object-oriented scripting language 
```

Additional info:

Comment 1 Jaroslav Mracek 2019-09-27 09:12:19 UTC
The key information is that "dnf module reset ruby" was used. In this step dnf remove all information about installed content of ruby module.

In past when module switch operation was allowed and dnf remember installed profiler other people complain that this behavior is incorrect, because same profile in different stream could have different package content.

Here is the list of commands that will result in state that you expect:

1. # dnf module install ruby:2.5
2. # dnf module reset ruby
3. # dnf module install ruby:2.6
4. # dnf distro-sync

Comment 2 Jun Aruga 2019-09-27 11:40:00 UTC
Jaroslav, thanks for the answer.

> In past when module switch operation was allowed and dnf remember installed profiler other people complain that this behavior is incorrect, because same profile in different stream could have different package content.

I see. But I see that there is a proposal for module switch operation here.
https://pagure.io/modularity/issue/143

My commands to switch a stream are from below modularity document.

> https://docs.fedoraproject.org/en-US/modularity/using-modules-switching-streams/

```
$ sudo dnf module reset NAME
$ sudo dnf module enable NAME:STREAM
$ sudo dnf --allowerasing distro-sync [RPM]...
```

Do you think it is better to change it to your suggested steps like this?


```
$ sudo dnf module reset NAME
$ sudo dnf module install NAME:STREAM
$ sudo dnf --allowerasing distro-sync [RPM]...
```


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