Bug 1673289

Summary: dnf enableplugin/disableplugin does not report unknown plugin
Product: Red Hat Enterprise Linux 8 Reporter: Eva Mrakova <emrakova>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: low Docs Contact:
Priority: low    
Version: 8.0CC: dmach, james.antill, mblaha
Target Milestone: rcKeywords: Triaged
Target Release: 8.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.2.7-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:21:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1681084    
Bug Blocks:    

Description Eva Mrakova 2019-02-07 09:07:22 UTC
Description of problem:
dnf --enableplugin/--disableplugin <plugin> does not report unknown 
(or just not installed) plugin, also in verbose mode.

Compat note: 
yum does not break the transaction due to unknown plugin but reports it:
# yum --enableplugin=unknown-plugin install zsh
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No plugin match for: unknown-plugin
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package zsh.x86_64 0:5.0.2-32.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package        Arch              Version                 Repository       Size
================================================================================
Installing:
 zsh            x86_64            5.0.2-32.el7            rhel            2.4 M
<snip>

Version-Release number of selected component (if applicable):
dnf-4.0.9.2-1.el8

How reproducible:
always

Steps to Reproduce:
1. dnf --enableplugin=unknown-plugin install zsh

Actual results:
# dnf --enableplugin=unknown-plugin install zsh
Last metadata expiration check: 1:10:46 ago on Thu 07 Feb 2019 02:46:08 AM EST.
Dependencies resolved.
================================================================================
 Package        Arch              Version                 Repository       Size
================================================================================
Installing:
 zsh            x86_64            5.5.1-6.el8             rhel            2.9 M
<snip>

Expected results:
it is reported that unknown-plugin was not enabled

Comment 2 Jaroslav Mracek 2019-04-09 18:22:22 UTC
I create a patch that solves the issue (https://github.com/rpm-software-management/dnf/pull/1374). Please is there any tests that covers the bugzilla?

Comment 3 Eva Mrakova 2019-04-12 09:52:52 UTC
(In reply to Jaroslav Mracek from comment #2)
> I create a patch that solves the issue
> (https://github.com/rpm-software-management/dnf/pull/1374). Please is there
> any tests that covers the bugzilla?

there's no such test yet

Comment 4 Jaroslav Mracek 2019-04-23 07:17:44 UTC
Please do you agree with a new statements? They differ from yum, but they are are more descriptive.

$ sudo dnf repoquery -C sdfdsff --disableplugin sffsdf,sddsd --enableplugin sadsdd,asdsd
No matches found for the following enable plugin patterns: asdsd, sadsdd
No matches found for the following disable plugin patterns: sddsd, sffsdf

Comment 5 Eva Mrakova 2019-04-23 07:47:19 UTC
I'd say it's OK. Thanks

Comment 6 Jaroslav Mracek 2019-06-06 08:51:07 UTC
Tests are here https://github.com/rpm-software-management/ci-dnf-stack/pull/552.

Comment 11 errata-xmlrpc 2019-11-05 22:21:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3583