Mageia Bugzilla – Attachment 9144 Details for
Bug 20551
Installer no longer respects default rpmsrate level when selecting packages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
prevent autovivification (mga#20551)
0001-prevent-autovivification-mga-20551.patch (text/plain), 4.05 KB, created by
Thierry Vignaud
on 2017-03-23 16:25:26 CET
(
hide
)
Description:
prevent autovivification (mga#20551)
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2017-03-23 16:25:26 CET
Size:
4.05 KB
patch
obsolete
>From aad0e9904fe1f845aaab086a542ddeef5559eb29 Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Thu, 23 Mar 2017 16:17:28 +0100 >Subject: [PATCH] prevent autovivification (mga#20551) > >commit 560f9ca983d743cc42701c24546ac8c2080a13fe introduced a regression >in that a lot of variables got autovivificated >This results in a bug for some of them, at least for 'compssListLevel' > >The solution is to store options values in a hash (which actually >simplifies here): >http://perldoc.perl.org/Getopt/Long.html#Storing-options-values-in-a-hash > >Thanks Martin Whitaker for the suggestion >--- > perl-install/install/install2.pm | 39 ++++++++++++++++++++------------------- > 1 file changed, 20 insertions(+), 19 deletions(-) > >diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm >index 16f75dc..f2f03a3 100644 >--- a/perl-install/install/install2.pm >+++ b/perl-install/install/install2.pm >@@ -524,15 +524,16 @@ sub parse_args { > exists $ENV{$_} and push @cmdline, sprintf("--%s=%s", lc($_), $ENV{$_}) foreach qw(METHOD PCMCIA KICKSTART); > > GetOptionsFromArray(\@cmdline, >+ $o, # must be 2nd parameter (see http://perldoc.perl.org/Getopt/Long.html#Storing-options-values-in-a-hash) > 'keyboard=s' => sub { $o->{keyboard} = $_[1]; push @::auto_steps, 'selectKeyboard' }, >- 'lang=s' => \$o->{lang}, >+ 'lang=s', > 'flang=s' => sub { $o->{lang} = $_[1]; push @::auto_steps, 'selectLanguage' }, > 'langs=s' => sub { $o->{locale}{langs} = +{ map { $_ => 1 } split(':', $_[1]) } }, >- 'method=s' => \$o->{method}, >- 'pcmcia=s' => \$o->{pcmcia}, >+ 'method=s', >+ 'pcmcia=s', > 'step=s' => \$o->{steps}{first}, >- 'meta_class=s' => \$o->{meta_class}, >- 'freedriver=s' => \$o->{freedriver}, >+ 'meta_class=s', >+ 'freedriver=s', > > # fs/block options: > no_bad_drives => \$o->{partitioning}{no_bad_drives}, >@@ -541,24 +542,24 @@ sub parse_args { > 'use_uuid=s' => sub { $::no_uuid_by_default = !$_[1] }, > > # urpmi options: >- debug_urpmi => \$o->{debug_urpmi}, >- deploops => \$o->{deploops}, >- justdb => \$o->{justdb}, >+ 'debug_urpmi', >+ 'deploops', >+ 'justdb', > 'tune-rpm' => sub { $o->{'tune-rpm'} = 'all' }, > > # GUI options: >- 'vga16=s' => \$o->{vga16}, >+ 'vga16=s', > 'vga=s' => sub { $o->{vga} = $_[1] =~ /0x/ ? hex($_[1]) : $_[1] }, >- 'display=s' => \$o->{display}, >+ 'display=s', > askdisplay => sub { print "Please enter the X11 display to perform the install on ? "; $o->{display} = chomp_(scalar(<STDIN>)) }, > 'newt|text' => sub { $o->{interactive} = "curses" }, > stdio => sub { $o->{interactive} = "stdio" }, >- simple_themes => \$o->{simple_themes}, >- 'theme=s' => \$o->{theme}, >- doc => \$o->{doc}, #- will be used to know that we're running for the doc team, >- #- e.g. we want screenshots with a good B&W contrast >+ 'simple_themes', >+ 'theme=s', >+ 'doc', #- will be used to know that we're running for the doc team, >+ #- e.g. we want screenshots with a good B&W contrast > >- 'security=s' => \$o->{security}, >+ 'security=s', > > # auto install options: > noauto => \$::noauto, >@@ -571,14 +572,14 @@ sub parse_args { > uml_install => sub { $::uml_install = $::local_install = 1 }, > > # debugging options: >- useless_thing_accepted => \$o->{useless_thing_accepted}, >+ 'useless_thing_accepted', > alawindows => sub { $o->{security} = 0; $o->{partitioning}{clearall} = 1; $o->{bootloader}{crushMbr} = 1 }, > fdisk => \$o->{partitioning}{fdisk}, >- 'nomouseprobe=s' => \$o->{nomouseprobe}, >- updatemodules => \$o->{updatemodules}, >+ 'nomouseprobe=s', >+ 'updatemodules', > > 'suppl=s' => \$o->{supplmedia}, >- askmedia => \$o->{askmedia}, >+ 'askmedia', > restore => \$::isRestore, > 'compsslistlevel=s' => \$o->{compssListLevel}, > ); >-- >2.9.3 >
From aad0e9904fe1f845aaab086a542ddeef5559eb29 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Thu, 23 Mar 2017 16:17:28 +0100 Subject: [PATCH] prevent autovivification (mga#20551) commit 560f9ca983d743cc42701c24546ac8c2080a13fe introduced a regression in that a lot of variables got autovivificated This results in a bug for some of them, at least for 'compssListLevel' The solution is to store options values in a hash (which actually simplifies here): http://perldoc.perl.org/Getopt/Long.html#Storing-options-values-in-a-hash Thanks Martin Whitaker for the suggestion --- perl-install/install/install2.pm | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 16f75dc..f2f03a3 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -524,15 +524,16 @@ sub parse_args { exists $ENV{$_} and push @cmdline, sprintf("--%s=%s", lc($_), $ENV{$_}) foreach qw(METHOD PCMCIA KICKSTART); GetOptionsFromArray(\@cmdline, + $o, # must be 2nd parameter (see http://perldoc.perl.org/Getopt/Long.html#Storing-options-values-in-a-hash) 'keyboard=s' => sub { $o->{keyboard} = $_[1]; push @::auto_steps, 'selectKeyboard' }, - 'lang=s' => \$o->{lang}, + 'lang=s', 'flang=s' => sub { $o->{lang} = $_[1]; push @::auto_steps, 'selectLanguage' }, 'langs=s' => sub { $o->{locale}{langs} = +{ map { $_ => 1 } split(':', $_[1]) } }, - 'method=s' => \$o->{method}, - 'pcmcia=s' => \$o->{pcmcia}, + 'method=s', + 'pcmcia=s', 'step=s' => \$o->{steps}{first}, - 'meta_class=s' => \$o->{meta_class}, - 'freedriver=s' => \$o->{freedriver}, + 'meta_class=s', + 'freedriver=s', # fs/block options: no_bad_drives => \$o->{partitioning}{no_bad_drives}, @@ -541,24 +542,24 @@ sub parse_args { 'use_uuid=s' => sub { $::no_uuid_by_default = !$_[1] }, # urpmi options: - debug_urpmi => \$o->{debug_urpmi}, - deploops => \$o->{deploops}, - justdb => \$o->{justdb}, + 'debug_urpmi', + 'deploops', + 'justdb', 'tune-rpm' => sub { $o->{'tune-rpm'} = 'all' }, # GUI options: - 'vga16=s' => \$o->{vga16}, + 'vga16=s', 'vga=s' => sub { $o->{vga} = $_[1] =~ /0x/ ? hex($_[1]) : $_[1] }, - 'display=s' => \$o->{display}, + 'display=s', askdisplay => sub { print "Please enter the X11 display to perform the install on ? "; $o->{display} = chomp_(scalar(<STDIN>)) }, 'newt|text' => sub { $o->{interactive} = "curses" }, stdio => sub { $o->{interactive} = "stdio" }, - simple_themes => \$o->{simple_themes}, - 'theme=s' => \$o->{theme}, - doc => \$o->{doc}, #- will be used to know that we're running for the doc team, - #- e.g. we want screenshots with a good B&W contrast + 'simple_themes', + 'theme=s', + 'doc', #- will be used to know that we're running for the doc team, + #- e.g. we want screenshots with a good B&W contrast - 'security=s' => \$o->{security}, + 'security=s', # auto install options: noauto => \$::noauto, @@ -571,14 +572,14 @@ sub parse_args { uml_install => sub { $::uml_install = $::local_install = 1 }, # debugging options: - useless_thing_accepted => \$o->{useless_thing_accepted}, + 'useless_thing_accepted', alawindows => sub { $o->{security} = 0; $o->{partitioning}{clearall} = 1; $o->{bootloader}{crushMbr} = 1 }, fdisk => \$o->{partitioning}{fdisk}, - 'nomouseprobe=s' => \$o->{nomouseprobe}, - updatemodules => \$o->{updatemodules}, + 'nomouseprobe=s', + 'updatemodules', 'suppl=s' => \$o->{supplmedia}, - askmedia => \$o->{askmedia}, + 'askmedia', restore => \$::isRestore, 'compsslistlevel=s' => \$o->{compssListLevel}, ); -- 2.9.3
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20551
:
9135
|
9136
|
9137
|
9138
|
9139
|
9140
|
9141
|
9142
|
9143
|
9144
|
9145
|
9146