From f33a077282e0277512c6e409c2c3fc5443f0a2f7 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 17 May 2015 10:58:47 +0200 Subject: add online media at installation end (mga#8819) --- perl-install/install/NEWS | 2 ++ perl-install/install/steps_interactive.pm | 31 +++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 183bd9887..b2b1ce3dc 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- add online media at installation end (mga#8819) + Version 16.99 - 20 May 2015 - bootloader: diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm index 3bbfb2699..5e0c2b9b6 100644 --- a/perl-install/install/steps_interactive.pm +++ b/perl-install/install/steps_interactive.pm @@ -736,6 +736,30 @@ sub installUpdates { return; } + $o->ask_yesorno_({ title => N("Updates"), messages => formatAlaTeX( +N("You now have the opportunity to setup online media.") . "\n\n" . +N("This allows to install security updates.") . "\n\n" . +N("To setup those media, you will need to have a working Internet +connection. + +Do you want to setup the update media?")), + interactive_help_id => 'installUpdates', + }, 1) or do { + log::l("installUpdates: skipping since user say no to media setup"); + return; + }; + + #- bring all interface up for installing updates packages. + install::interactive::upNetwork($o); + + install::pkgs::clean_rpmdb_shared_regions(); + if (any::urpmi_add_all_media($o, $o->{previous_release})) { + log::l("installUpdates: successfully added media"); + } else { + log::l("installUpdates: failed to add media"); + die "failed to add media" + } + $o->ask_yesorno_({ title => N("Updates"), messages => formatAlaTeX( N("You now have the opportunity to download updated packages. These packages have been updated after the distribution was released. They may @@ -751,15 +775,10 @@ Do you want to install the updates?")), return; }; - #- bring all interface up for installing updates packages. - install::interactive::upNetwork($o); - - install::pkgs::clean_rpmdb_shared_regions(); - if (any::urpmi_add_all_media($o, $o->{previous_release})) { my $binary = find { whereis_binary($_, $::prefix) } if_(check_for_xserver(), 'gurpmi2'), 'urpmi' or return; my $log_file = '/root/drakx/updates.log'; run_program::rooted($::prefix, $binary, '>>', $log_file, '2>>', $log_file, '--auto-select'); - } + install::pkgs::clean_rpmdb_shared_regions(); #- not downing network, even ppp. We don't care much since it is the end of install :) -- cgit v1.2.1