Bug 1541332

Summary: [modularity] info for more args fails just after the first unknown arg
Product: [Fedora] Fedora Reporter: Eva Mrakova <emrakova>
Component: dnfAssignee: rpm-software-management
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 28CC: dmach, jmracek, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.0.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-22 18:23:40 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:    
Bug Blocks: 1478068    

Description Eva Mrakova 2018-02-02 10:14:08 UTC
Description of problem:

when 'dnf module info' has more arguments, it exits with error immediately after processing the first unknown argument (or insufficiently specified one).

So
$ dnf module info <Module-OK> <Module-not-OK>
provides info about <Module-OK> and then exits with an error
while 
$ dnf module info <Module-not-OK> <Module-OK>
only exits with (the same) error.

Behaviour of 'dnf info' is different, it always shows info about all known arguments.

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

How reproducible:
always

Steps to Reproduce:
1. create and enable a module (e.g. ModuleX)
2. run 
   $ dnf module info ModuleX non-existent-module
   $ dnf module info non-existent-module ModuleX

Actual results:

# dnf module info ModuleX non-existent-module
<snip>
Name        : ModuleX
Stream      : f26
Version     : 1
Profiles    : default
Repo        : modularityX
Summary     : Module ModuleX summary
Description : Module ModuleX description
Artifacts   : TestX-1-1.modX.noarch

Error: No such module: non-existent-module
# dnf module info non-existent-module ModuleX
<snip>
Error: No such module: non-existent-module

Expected results:

the results of the two commands are consistent, 
either info for all known args is shown (and unknown args are reported)
or only the same error for both cases is reported (and no info is provided)

Additional info:

there are more dnf module subcommands with similar behaviour as described here for info, e.g. enable and disable

Comment 1 Fedora End Of Life 2018-02-20 15:32:14 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.