Bug 17923

Summary: urpmq -Yf or urpmq --list-media fails if perl-Getopt-Long 2.480.0 is installed
Product: Mageia Reporter: Jani Välimaa <jani.valimaa>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: stephane.pontier
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: urpmi CVE:
Status comment:

Description Jani Välimaa 2016-03-09 17:12:09 CET
Because of changes [1] in latest perl-Getopt-Long, urpmq fails if -Yf or --list-media switches are used.

Perl bundles older (and "working") version of perl(Getopt::Long), but it is possible to install newer one by hand as it's also shipped as a separate pkg. At some point bundled version will be updated and we will face the same issue for sure.

Possible fix is to remove 'gnu_compat' option from 
/usr/lib/perl5/vendor_perl/5.22.1/urpm/args.pm line 21:

..snip..
# Configuration of Getopt. urpmf is a special case, because we need to
# parse non-alphanumerical options (-! -( -))
my @configuration = qw(bundling gnu_compat permute);
..snip..

However, I don't know if removing 'gnu_compat' causes some side effects.

[1] https://rt.cpan.org/Public/Bug/Display.html?id=39052
Comment 1 Jani Välimaa 2016-03-09 17:16:02 CET
$ rpm -q perl-Getopt-Long
package perl-Getopt-Long is not installed
$ urpmq -Yf nano
nano-2.5.3-1.mga6.x86_64

$ rpm -q perl-Getopt-Long
perl-Getopt-Long-2.480.0-1.mga6
$ urpmq -Yf nano
Unknown option: Yf
nano
Stéphane Pontier 2016-03-12 10:58:34 CET

CC: (none) => stephane.pontier

Comment 2 Mageia Robot 2016-07-11 17:26:51 CEST
commit c64a6c718adf88b4adc3d0105a2e2c7a28709bc1
Author: Shlomi Fish <shlomif@...>
Date:   Mon Jul 11 12:42:10 2016 +0200

    add 'no_ignore_case' to Getopt options (mga#17923)
    
    thus fixing t/superuser--orphans.t regressions
---
 Commit Link:
   http://gitweb.mageia.org/software/rpm/urpmi/commit/?id=c64a6c718adf88b4adc3d0105a2e2c7a28709bc1
Comment 3 Thierry Vignaud 2016-07-11 17:27:57 CEST
Fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED