Bug 1806204 - dnf modular filtering wrongly applied at repoquery for another repo
Summary: dnf modular filtering wrongly applied at repoquery for another repo
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: 2020-02-22 21:14 UTC by Miro Hrončok
Modified: 2020-02-25 16:19 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-25 12:42:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2020-02-22 21:14:39 UTC
Description of problem:
When a module stream is enabled, suddenly repoquery for another repo yields wrong results.

Version-Release number of selected component (if applicable):
dnf-4.2.18-1.fc31

How reproducible: Easy


Steps to Reproduce:

$ repoquery --repo=rawhide-source aopalliance
aopalliance-0:1.0-21.fc32.src

[~]$ dnf module enable maven  # or dnf install maven
Last metadata expiration check: 0:03:54 ago on Sat 22 Feb 2020 10:04:22 PM CET.
Dependencies resolved.
================================================================================
 Package           Architecture     Version             Repository         Size
================================================================================
Enabling module streams:
 maven                              3.5                                        

Transaction Summary
================================================================================

Is this ok [y/N]: y
Complete!

[~]$ repoquery --repo=rawhide-source aopalliance
(empty)

[~]$ dnf module reset maven
Dependencies resolved.
================================================================================
 Package           Architecture     Version             Repository         Size
================================================================================
Resetting modules:
 maven                                                                         

Transaction Summary
================================================================================

Is this ok [y/N]: y
Complete!

[~]$ repoquery --repo=rawhide-source aopalliance
aopalliance-0:1.0-21.fc32.src


Actual results:
When maven default stream is enabled, I cannot properly repoquery rawhide repos.


Expected results:
Whether I have or not have anything enabled on my system should not have any meaning on the repoquery results for another repo.

Comment 1 Marek Blaha 2020-02-24 07:27:53 UTC
Unfortunately, this is expected (see "Package filtering" in dnf.modularity(7)):

# dnf module info maven
Name             : maven
Stream           : 3.5 [d][a]
Version          : 2920191030094746
Artifacts        : aopalliance-0:1.0-17.module_f29+6921+ca3ed728.noarch
                 : aopalliance-0:1.0-17.module_f29+6921+ca3ed728.src

Module maven contains package named 'aopalliance' in it's artifacts, hence after enabling the module all 'aopalliance' packages other then those included in the module are filtered out.
There is a workaround to see all results regardless the modules states by setting all repositories as a "hotfix" ones:

# repoquery aopalliance --repo=rawhide-source --setopt=*.module_hotfixes=1

Comment 2 Jaroslav Mracek 2020-02-25 12:42:43 UTC
Also disabling modular repository will not help because metadata for enabled streams are stored and applied as a fail-safe mechanism. I am really sorry but the behaviour reflects design. I hope that a future design will be less invasive, but at the present time it is not a bug but feature described in man pages.

Comment 3 Miro Hrončok 2020-02-25 16:19:11 UTC
Design bugs are bugs as well ;)


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