Bug 7030

Summary: merge urpmq options --list-media, --list-url and --dump
Product: Mageia Reporter: Florian Hubold <doktor5000>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: urpmi CVE:
Status comment:

Description Florian Hubold 2012-08-12 17:33:23 CEST
Description of problem:

The mentioned urpmi commands --list-media,--list-url and --dump all have the same purpose, to list the repositories. As only listing media isnot really relevant, could all those options be merge into one. This new one should also accept the "active" keyword as in "urpmi --list-media active" (which by the way is not documented, this should be added to the manpage, furthermore the --dump option is also currently no documented)
Manuel Hiebel 2012-08-12 19:16:40 CEST

Source RPM: (none) => urpmi

Comment 1 Thierry Vignaud 2012-08-13 10:19:49 CEST
First, it's not urpmi but urpmq tool.
Second these options've different purposes, different output formatting.
As for the missing "dump" option, there's no such option. There's only "--dump-config" which is documented in urpmq man page.

However, the Getopt::Long module (which is used to parse the command line) enables to use abbreviated option names:

"Without additional configuration, GetOptions() will ignore the case of option names, and allow the options to be abbreviated to uniqueness.

  GetOptions ('length|height=f' => \$length, "head" => \$head);

This call will allow "--l" and "--L" for the length option, but requires a least "--hea" and "--hei" for the head and height options.

Status: NEW => RESOLVED
Resolution: (none) => INVALID
Summary: merge urpmi options --list-media, --list-url and --dump => merge urpmq options --list-media, --list-url and --dump