summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-23 19:50:35 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-23 19:50:35 +0000
commitf4bc86bc94aeeeffb8a82b16b38b760590b80bdf (patch)
treeb5a904657487cd5dfec16ca195ee72b9098a086f /perl-install/install
parentcb09d79bc963f95780d214aa12e695d8f9e338e2 (diff)
downloaddrakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar.gz
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar.bz2
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar.xz
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.zip
perl_checker cleanups
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/any.pm1
-rw-r--r--perl-install/install/commands.pm2
-rw-r--r--perl-install/install/media.pm8
-rw-r--r--perl-install/install/pkgs.pm4
-rw-r--r--perl-install/install/steps.pm3
-rw-r--r--perl-install/install/steps_gtk.pm1
-rw-r--r--perl-install/install/steps_interactive.pm13
7 files changed, 19 insertions, 13 deletions
diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm
index d1e4fc847..8cd9159d5 100644
--- a/perl-install/install/any.pm
+++ b/perl-install/install/any.pm
@@ -906,6 +906,7 @@ sub generate_automatic_stage1_params {
$method = $1; #- in stage1, FTP via HTTP proxy is available through FTP config, not HTTP
@ks = (server => $2, directory => $3);
} elsif ($o->{method} eq 'ftp') {
+ require install::ftp;
my @l = install::ftp::parse_ftp_url($ENV{URLPREFIX});
@ks = (server => $l[0], directory => $l[1], user => $l[2], pass => $l[3]);
} elsif ($o->{method} eq 'nfs') {
diff --git a/perl-install/install/commands.pm b/perl-install/install/commands.pm
index 55e1f103e..154a9cfb1 100644
--- a/perl-install/install/commands.pm
+++ b/perl-install/install/commands.pm
@@ -412,7 +412,7 @@ sub bug {
require install::any;
$part = $in->ask_from_listf('', "Which device?", \&partition_table::description,
- [ install::any::removable_media__early_in_install() ] ) or return;
+ [ install::any::removable_media__early_in_install() ]) or return;
}
warn "putting file report.bug on $part->{device}\n";
diff --git a/perl-install/install/media.pm b/perl-install/install/media.pm
index 95a5728ff..27b931266 100644
--- a/perl-install/install/media.pm
+++ b/perl-install/install/media.pm
@@ -486,11 +486,11 @@ sub _parse_media_cfg {
sub select_only_some_media {
my ($media_list, $selected_names) = @_;
my @names = split(',', $selected_names);
- foreach my $m (@{$media_list}) {
+ foreach my $m (@$media_list) {
my $bool = !member($m->{name}, @names);
# workaround urpmi transforming "ignore => ''" or "ignore => 0" into "ignore => 1":
undef $bool if !$bool;
- log::l "disabling '$m->{name}' medium: " . to_bool($bool);
+ log::l("disabling '$m->{name}' medium: " . to_bool($bool));
urpm::media::_tempignore($m, $bool);
# make sure we update un-ignored media (eg: */Testing and the like):
$m->{modified} = 1 if !$bool;
@@ -715,13 +715,13 @@ sub get_standalone_medium {
}
sub _get_medium {
- my ($in_wait, $phys_m, $packages, $m) = @_;
+ my ($_in_wait, $phys_m, $packages, $m) = @_;
!$m->{ignore} or log::l("ignoring packages in $m->{rel_hdlist}"), return;
my $url = _get_media_url({}, $phys_m);
log::l("trying '$url'\n");
- urpm::media::add_medium($packages, $m->{name} || 'Supplementary medium', $url) or $packages->{fatal}(10, N("unable to add medium"));
+ urpm::media::add_medium($packages, $m->{name} || 'Supplementary medium', $url, 0) or $packages->{fatal}(10, N("unable to add medium"));
}
diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm
index 63e33021d..9ce16831f 100644
--- a/perl-install/install/pkgs.pm
+++ b/perl-install/install/pkgs.pm
@@ -528,7 +528,7 @@ sub computeGroupSize {
if (find { $_->flag_available } @choices_pkgs) {
@choices = (); #- one package is already selected (?)
} else {
- @choices = map { $_->id } packageCallbackChoices($packages, undef, undef, \@choices_pkgs, $virtual);
+ @choices = map { $_->id } packageCallbackChoices($packages, undef, undef, \@choices_pkgs, $virtual, undef);
}
}
push @l2, @choices;
@@ -761,7 +761,7 @@ sub is_package_installed {
}
sub _install_raw {
- my ($packages, $isUpgrade, $callback, $LOG, $noscripts) = @_;
+ my ($packages, $_isUpgrade, $callback, $LOG, $noscripts) = @_;
# prevent warnings in install's logs:
local $ENV{LC_ALL} = 'C';
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm
index 2d9d15200..c9d2dde5c 100644
--- a/perl-install/install/steps.pm
+++ b/perl-install/install/steps.pm
@@ -753,8 +753,9 @@ sub read_bootloader_config {
sub setupBootloaderBefore {
my ($o) = @_;
+ my $bool = $o->{meta_class} ne 'server';
any::setupBootloaderBefore($o->do_pkgs, $o->{bootloader}, $o->{all_hds}, $o->{fstab}, $o->{keyboard},
- $o->{allowFB}, $o->{vga}, ($o->{meta_class} ne 'server') x 2);
+ $o->{allowFB}, $o->{vga}, $bool, $bool);
}
sub setupBootloader {
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm
index 49f68e9b8..9893d1c75 100644
--- a/perl-install/install/steps_gtk.pm
+++ b/perl-install/install/steps_gtk.pm
@@ -497,6 +497,7 @@ sub choosePackagesTree {
interactive_help => sub {
interactive::gtk::display_help($o,
{ interactive_help_id =>
+ # FIXME: missing ref to upper window:
'choosePackages#choosePackagesTree' }, my $w) },
ok => N("Install"),
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm
index d89885fba..9ce558f64 100644
--- a/perl-install/install/steps_interactive.pm
+++ b/perl-install/install/steps_interactive.pm
@@ -53,7 +53,7 @@ sub acceptLicense {
my ($o) = @_;
return if $o->{useless_thing_accepted};
- any::acceptLicense($o, $o->{meta_class} eq 'powerpack');
+ any::acceptLicense($o);
}
sub selectLanguage {
@@ -484,6 +484,7 @@ sub _chooseDesktop {
my $default_choice = (find { $rpmsrate_flags_chosen->{"CAT_" . $_->[0]} } @l) || $l[0];
my $choice = $default_choice;
if ($o->isa('interactive::gtk')) {
+ # perl_checker: require install::steps_gtk
$choice = install::steps_gtk::reallyChooseDesktop($o, $title, $message, \@l, $default_choice);
} else {
$o->ask_from_({ title => $title, message => $message }, [
@@ -582,7 +583,7 @@ sub chooseGroups {
my $suggests;
$o->ask_from_({ title => N("Type of install"),
- message =>N("You have not selected any group of packages.
+ message => N("You have not selected any group of packages.
Please choose the minimal installation you want:"),
interactive_help_id => 'choosePackages#minimal-install'
},
@@ -732,7 +733,7 @@ sub configureNetwork {
#------------------------------------------------------------------------------
sub installUpdates {
my ($o) = @_;
- my $u = $o->{updates} ||= {};
+ $o->{updates} ||= {};
$o->hasNetwork or return;
@@ -850,8 +851,10 @@ sub summary {
group => N("System"),
label => N("Bootloader"),
val => sub {
- #-PO: example: lilo-graphic on /dev/hda1
- $o->{bootloader}{boot} ? N("%s on %s", $o->{bootloader}{method}, $o->{bootloader}{boot}) : N("None");
+
+ $o->{bootloader}{boot} ?
+ #-PO: example: lilo-graphic on /dev/hda1
+ N("%s on %s", $o->{bootloader}{method}, $o->{bootloader}{boot}) : N("None");
},
clicked => sub {
any::setupBootloader($o, $o->{bootloader}, $o->{all_hds}, $o->{fstab}, $o->{security}) or return;