summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2017-03-23 16:17:28 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2017-03-24 14:36:00 +0100
commit73743912c3d2eb61012a9f4273972e3701dc6b55 (patch)
tree5cde7069d95b98cfd8e1cb1b54ef4be0b8f8b353 /perl-install
parentb23ebb909230ab614e9b32e1a3833f109e55f5ca (diff)
downloaddrakx-73743912c3d2eb61012a9f4273972e3701dc6b55.tar
drakx-73743912c3d2eb61012a9f4273972e3701dc6b55.tar.gz
drakx-73743912c3d2eb61012a9f4273972e3701dc6b55.tar.bz2
drakx-73743912c3d2eb61012a9f4273972e3701dc6b55.tar.xz
drakx-73743912c3d2eb61012a9f4273972e3701dc6b55.zip
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
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/install/install2.pm41
2 files changed, 23 insertions, 20 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 2a16bff1e..dc1aac643 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,5 +1,7 @@
- installer options handling:
o ignore case for options line in previous releases
+ o fix default value for 'compssListLevel' (mga#20551)
+ (both being post mga5 regression)
Version 17.75 - 17 March 2017
diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm
index 1cf5e6773..90759e651 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,16 +572,16 @@ 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},
+ 'compssListLevel=s' # case is important!
);
($cfg, $patch);