summaryrefslogtreecommitdiffstats
path: root/perl-install/install/steps_interactive.pm
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/steps_interactive.pm
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/steps_interactive.pm')
-rw-r--r--perl-install/install/steps_interactive.pm13
1 files changed, 8 insertions, 5 deletions
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;
$urpm = urpm->new_parse_cmdline or usage(); if ($options{'xml-info'}) { member($options{'xml-info'}, urpm::xml_info_policies()) or die N("known xml-info policies are %s", join(', ', urpm::xml_info_policies())) . "\n"; } our ($name, $url, $with, $relative_synthesis) = our @cmdline; my $with_dir; $options{quiet} = 1 if $options{verbose} < 0; $url or ($url, $name) = ($name, ''); if ($options{mirrorlist}) { if ($options{distrib}) { $url and die N("no argument needed for --distrib --mirrorlist <url>") . "\n"; } else { ($with_dir, $url) = ($url, undef); } } else { $url =~ m,^(([^:]*):/)?/, or die N("bad <url> (for local directory, the path must be absolute)") . "\n"; } if ($< != 0) { $urpm->{fatal}(1, N("Only superuser is allowed to add media")); } if (!-e $urpm->{config}) { $urpm->{log}(N("creating config file [%s]", $urpm->{config})); open my $_f, '>', $urpm->{config} or $urpm->{fatal}(6, N("Can't create config file [%s]", $urpm->{config})); } my $_urpmi_lock = urpm::lock::urpmi_db($urpm, 'exclusive', wait => $options{wait_lock}); urpm::media::read_config($urpm); my $ok = 1; if ($options{distrib}) { $with || $relative_synthesis and usage N("no need to give <relative path of synthesis> with --distrib"); my $add_media_callback = $options{interactive} ? sub { my ($medianame, $add_by_default) = @_; my $yesexpr = N("Yy"); $add_by_default = 1 if $options{allmedia}; my $answer = message_input_( N("\nDo you want to add media '%s'", $medianame) . ($add_by_default ? N(" (Y/n) ") : N(" (y/N) ")), boolean => 1, ); return $answer ? $answer =~ /[$yesexpr]/ : $add_by_default; } : $options{allmedia} ? sub { 1; } : undef; urpm::media::add_distrib_media($urpm, $name, $url, mirrorlist => $options{mirrorlist}, virtual => $options{virtual}, update => $options{update}, probe_with => $options{probe_with}, nolock => $options{nolock}, ask_media => $add_media_callback, 'xml-info' => $options{'xml-info'}, ); $ok = urpm::media::update_media($urpm, %options, quiet => $options{verbose} < 0, callback => \&urpm::download::sync_logger); } else { $name or usage(); if ($with eq "with") { $relative_synthesis or usage N("<relative path of synthesis> missing\n"); } if ($options{probe_with} && $options{probe_with} eq 'rpms' && !urpm::is_local_url($url)) { die N("Can't use %s with remote medium", "--probe-rpms"); } urpm::media::add_medium($urpm, $name, $url, $relative_synthesis, mirrorlist => $options{mirrorlist}, 'with-dir' => $with_dir, virtual => $options{virtual}, update => $options{update}, ignore => $options{raw}, nolock => $options{nolock}, 'xml-info' => $options{'xml-info'}, ) or $urpm->{fatal}(10, N("unable to add medium")); urpm::download::copy_cmd_line_proxy($name); if ($options{raw}) { urpm::media::write_config($urpm); } else { $ok = urpm::media::update_media($urpm, %options, quiet => $options{verbose} < 0, callback => \&urpm::download::sync_logger); } } #- try to umount removable devices which may have been mounted. urpm::removable::try_umounting_removables($urpm); exit($ok ? 0 : 1); # vim:ts=8:sts=4:sw=4