Bug 1806303 - DNF installs content from non-default (anymore) modules
Summary: DNF installs content from non-default (anymore) modules
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 34
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Daniel Mach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1807832
TreeView+ depends on / blocked
 
Reported: 2020-02-23 17:34 UTC by Igor Raits
Modified: 2021-02-09 16:23 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 19:28:20 UTC
Type: Bug


Attachments (Terms of Use)

Description Igor Raits 2020-02-23 17:34:45 UTC
Description of problem:
In https://pagure.io/releng/fedora-module-defaults/c/5ebe9aa22cdb63f2b7dddf74c613e5f9c76eff6e?branch=f31 we have removed defaults for all Rust modules, but DNF still thinks that they are default and tries to install content from them.

Version-Release number of selected component (if applicable):
libdnf-0.43.1-2.fc31.x86_64
dnf-4.2.18-1.fc31.noarch

How reproducible:
Always.

Steps to Reproduce:
1. Run fedora:31 container
2. Try to install ripgrep

Actual results:
Enables modular streams.

Expected results:
Installs non-modular content.

Additional info:
[root@4f733b2b8a33 yum.repos.d]# dnf install ripgrep
Last metadata expiration check: 0:02:20 ago on Sun Feb 23 17:28:01 2020.
Dependencies resolved.
===============================================================================
 Package   Arch     Version                             Repository        Size
===============================================================================
Installing:
 ripgrep   x86_64   11.0.2-1.module_f31+5277+6a997f58   fedora-modular   1.4 M
Enabling module streams:
 ripgrep            latest                                                    

Transaction Summary
===============================================================================
Install  1 Package

Total download size: 1.4 M
Installed size: 4.3 M
Is this ok [y/N]: n
Operation aborted.
[root@4f733b2b8a33 yum.repos.d]# dnf install tokei
Last metadata expiration check: 0:02:26 ago on Sun Feb 23 17:28:01 2020.
Dependencies resolved.
===============================================================================
 Package Arch     Version                               Repository        Size
===============================================================================
Installing:
 tokei   x86_64   10.0.1-2.module_f31+6559+88f5b3b0     fedora-modular   1.1 M
Enabling module streams:
 tokei            rolling                                                     

Transaction Summary
===============================================================================
Install  1 Package

Total download size: 1.1 M
Installed size: 3.4 M
Is this ok [y/N]: n
Operation aborted.

---

[root@4f733b2b8a33 yum.repos.d]# dnf install ffsend
Last metadata expiration check: 0:05:12 ago on Sun Feb 23 17:28:01 2020.
Dependencies resolved.
===============================================================================
 Package  Arch     Version                              Repository        Size
===============================================================================
Installing:
 ffsend   x86_64   0.2.49-1.module_f31+5376+bde064f8    fedora-modular   2.2 M
Installing weak dependencies:
 xsel     x86_64   1.2.0-25.fc31                        fedora            28 k
Enabling module streams:
 ffsend            latest                                                     

Transaction Summary
===============================================================================
Install  2 Packages

Total download size: 2.2 M
Installed size: 6.4 M
Is this ok [y/N]: n
Operation aborted.
[root@4f733b2b8a33 yum.repos.d]# dnf install --disablerepo=fedora-modular,home_ignatenkobrain_rust ffsend
Last metadata expiration check: 0:05:39 ago on Sun Feb 23 17:27:41 2020.
Dependencies resolved.
===============================================================================
 Package         Architecture    Version                Repository        Size
===============================================================================
Installing:
 ffsend          x86_64          0.2.57-1.fc31          updates          2.3 M
Installing weak dependencies:
 xsel            x86_64          1.2.0-25.fc31          fedora            28 k

Transaction Summary
===============================================================================
Install  2 Packages

Total download size: 2.3 M
Installed size: 6.8 M
Is this ok [y/N]: n
Operation aborted.

---

This is really important bug since nobody can get any fixes for the content which used to be in modules.

And no, this is supposed to happen during lifecycle of the release, not when people upgrade to next version of distribution

Comment 1 Daniel Mach 2020-02-24 13:05:36 UTC
This is expected behavior.

$ podman pull fedora:31
$ podman run -it fedora:31
$ dnf module list ripgrep
Fedora Modular 31 - x86_64
Name     Stream      Profiles    Summary                                             
ripgrep  latest [d]  default [d] Line oriented search tool using Rust's regex library

Fedora Modular 31 - x86_64 - Updates
Name     Stream      Profiles    Summary                                             
ripgrep  latest [d]  default [d] Line oriented search tool using Rust's regex library

^^^ it shows ripgrep:latest as the default stream

I believe the problem is that fedora-modular still has the default defined.
It must be removed also from this repo.
Module metadata incl. defaults work across repositories by definition.

Comment 3 Daniel Mach 2020-02-24 14:37:49 UTC
In that case, we need to put the defaults back to the updates, but with empty stream:

document: modulemd-defaults
version: 1
data:
    module: ripgrep
    stream:



Steps for testing the solution:

FROM fedora:31
# turn off zchunk so we can easily access yaml content from command line
RUN echo "zchunk=0" >> /etc/dnf/dnf.conf
RUN dnf -y makecache
RUN dnf -y install less createrepo_c
RUN mkdir -p /opt/ripgrep \
    && cd /opt/ripgrep \
    && echo -e "document: modulemd-defaults\nversion: 1\ndata:\n    module: ripgrep\n    stream:\n" > ripgrep-defaults.yaml \
    && createrepo_c . \
    && modifyrepo_c --mdtype=modules ripgrep-defaults.yaml repodata/ \
    && echo -e "[ripgrep-defaults-override]\nbaseurl=file:///opt/ripgrep/\nenabled=1\n" > /etc/yum.repos.d/ripgrep-defaults-override.repo
RUN dnf -y module list ripgrep

Comment 4 Daniel Mach 2020-02-24 14:42:27 UTC
One more thing: to be honest, I don't recall how modulemd priorities work when defaults merge.

I tested this with following names in case file name or repoid order matters:
ripgrep-defaults-override (> fedora-modular)
aaa-ripgrep-defaults-override (< fedora-modular)

Both cases seem to work fine.

Comment 5 Miro Hrončok 2020-02-26 15:05:30 UTC
> This is expected behavior.

Expected by who?

Comment 6 Miro Hrončok 2020-02-27 10:43:27 UTC
As shown in https://www.reddit.com/r/Fedora/comments/fa9yac/modular_repo_provides_older_package_than_updates/ this is most certainly not expected by our users.

Comment 7 Daniel Mach 2020-02-28 08:55:22 UTC
(In reply to Miro Hrončok from comment #5)
> > This is expected behavior.
> 
> Expected by who?

Expected by modularity specifications we were getting from the former Modularity team.
We should check if it's documented properly. If not, we need to fix it.

It doesn't matter from which repos modulemd and related yaml documents come.
They are merged and used globally.

This scenario is similar to:
* package foo is in the fedora repo
* package foo is *not* in the updates repo
* -> package foo is still available, because it wasn't obsoleted

Creating modulemd-defaults document with empty stream is such override/obsolete.

Comment 8 Ben Cotton 2020-11-03 17:25:58 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Ben Cotton 2020-11-24 19:28:20 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 10 Miro Hrončok 2020-11-24 19:41:25 UTC
This has slipped through, it still happens this way when defaults are in play.

Comment 11 Ben Cotton 2021-02-09 16:23:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.


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