summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-01 09:13:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-01 09:13:25 +0000
commit848081d301fc9c565c3bc5e1e938811b04769406 (patch)
treef514bf9ab5dc281fba28a30fd6757856a5631cfb /perl-install
parent05cc815a368874128fdd8dce1ad079b64831c8d2 (diff)
downloaddrakx-848081d301fc9c565c3bc5e1e938811b04769406.tar
drakx-848081d301fc9c565c3bc5e1e938811b04769406.tar.gz
drakx-848081d301fc9c565c3bc5e1e938811b04769406.tar.bz2
drakx-848081d301fc9c565c3bc5e1e938811b04769406.tar.xz
drakx-848081d301fc9c565c3bc5e1e938811b04769406.zip
- if network access, configure urpmi with --mirrorlist --distrib,
and install updates. This replaces the previous "Install Updates" step. - this calls gurpmi.addmedia/urpmi.addmedia and gurpmi2/urpmi in chroot - we do not allow anymore to choose which updates are going to be updated (ie choosePackagesTree is not used for this anymore)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm8
-rw-r--r--perl-install/install/NEWS2
-rw-r--r--perl-install/install/steps.pm20
-rw-r--r--perl-install/install/steps_gtk.pm5
-rw-r--r--perl-install/install/steps_interactive.pm36
5 files changed, 15 insertions, 56 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 123abbf3f..e63871c28 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -845,7 +845,13 @@ sub urpmi_add_all_media {
#- configure urpmi media if network is up
require network::tools;
return if !network::tools::has_network_connection();
- my $_wait = $in->wait_message(N("Please wait"), N("Please wait, adding media..."));
+ my $wait;
+ if ($binary eq 'urpmi.addmedia') {
+ $wait = $in->wait_message(N("Please wait"), N("Please wait, adding media..."));
+ } elsif ($in->isa('interactive::gtk')) {
+ mygtk2::destroy_previous_popped_and_reuse_window();
+ mygtk2::flush();
+ }
run_program::rooted($::prefix, $binary, '--distrib', '--mirrorlist', '$MIRRORLIST');
}
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index d848ec4f4..2fdd6af03 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,6 @@
- hack /tmp/.X11-unix to allow accessing X in chroot
+- if network access, configure urpmi with --mirrorlist --distrib,
+ and install updates. This replaces the previous "Install Updates" step.
Version 11.29 - 29 August 2008
diff --git a/perl-install/install/steps.pm b/perl-install/install/steps.pm
index 652ea2f26..e669a3790 100644
--- a/perl-install/install/steps.pm
+++ b/perl-install/install/steps.pm
@@ -662,25 +662,7 @@ sub configure_firewall {
}
#------------------------------------------------------------------------------
-sub installUpdates {
- my ($o) = @_;
- my $u = $o->{updates} or return;
- $u->{url} or return;
-
- upNetwork($o);
- require mirror;
-
- # FIXME: install all update media
- my $phys_medium = install::media::url2mounted_phys_medium($o, $u->{url} . '/media/main/updates');
-
- my $update_medium = { name => "Updates for Mandriva Linux " . $o->{product_id}{version}, update => 1 };
- install::media::get_standalone_medium($o, $phys_medium, $o->{packages}, $update_medium);
-
- $o->pkg_install(@{$u->{packages} || []});
-
- #- re-install urpmi with update security medium.
- install_urpmi($o);
-}
+sub installUpdates {}
sub summaryBefore {}
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm
index 4a66000c6..372a7ed30 100644
--- a/perl-install/install/steps_gtk.pm
+++ b/perl-install/install/steps_gtk.pm
@@ -328,7 +328,7 @@ sub reallyChooseGroups {
}
sub choosePackagesTree {
- my ($o, $packages, $o_limit_medium) = @_;
+ my ($o, $packages) = @_;
my $available = install::any::getAvailableSpace($o);
my $availableCorrected = install::pkgs::invCorrectSize($available / sqr(1024)) * sqr(1024);
@@ -351,7 +351,6 @@ sub choosePackagesTree {
my ($add_node, $flat) = @_;
if ($flat) {
foreach (sort map { $_->name }
- grep { !$o_limit_medium || install::pkgs::packageMedium($packages, $_) == $o_limit_medium }
grep { $_ && $_->arch ne 'src' }
@{$packages->{depslist}}) {
$add_node->($_, undef);
@@ -361,7 +360,6 @@ sub choosePackagesTree {
my (@firstchoice, @others);
my %fl = map { ("CAT_$_" => 1) } @{$root->{flags}};
foreach my $p (@{$packages->{depslist}}) {
- !$o_limit_medium || install::pkgs::packageMedium($packages, $p) == $o_limit_medium or next;
my @flags = $p->rflags;
next if !($p->rate && any { any { !/^!/ && $fl{$_} } split('\|\|') } @flags);
$p->rate >= 3 ?
@@ -489,7 +487,6 @@ sub choosePackagesTree {
],
state => {
auto_deps => 1,
- flat => $o_limit_medium,
},
};
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm
index 72f5a9a74..ae549d7ac 100644
--- a/perl-install/install/steps_interactive.pm
+++ b/perl-install/install/steps_interactive.pm
@@ -756,42 +756,14 @@ connection.
Do you want to install the updates?")),
interactive_help_id => 'installUpdates',
- }) or return;
+ }, 1) or return;
#- bring all interface up for installing updates packages.
install::interactive::upNetwork($o);
- #- update medium available and working.
- my $update_medium;
- do {
- $u->{url} = install::any::ask_mirror($o, 'updates', $u->{url}) or goto &installUpdates;
- # FIXME: install all update media
- my $phys_medium = install::media::url2mounted_phys_medium($o, $u->{url} . '/media/main/updates');
-
- eval {
- my $_w = $o->wait_message('', N("Contacting the mirror to get the list of available packages..."));
- $update_medium = { name => "Updates for Mandriva Linux " . $o->{product_id}{version}, update => 1 };
- install::media::get_standalone_medium($o, $phys_medium, $o->{packages}, $update_medium);
- };
- if ($@) {
- undef $update_medium;
- $o->ask_warn('', N("Unable to contact mirror %s", $u->{mirror}));
- }
- } until $update_medium;
-
- if ($update_medium) {
- if ($o->choosePackagesTree($o->{packages}, $update_medium)) {
- $o->{isUpgrade} = 1; #- now force upgrade mode, else update will be installed instead of upgraded.
- $o->pkg_install;
- } else {
- #- make sure to not try to install the packages (which are automatically selected by getPackage above).
- #- this is possible by deselecting the medium (which can be re-selected above).
- $update_medium->{selected} = 0;
- goto &installUpdates;
- }
- #- update urpmi even, because there is an hdlist available and everything is good,
- #- this will allow user to update the medium but update his machine later.
- install::steps::install_urpmi($o);
+ if (any::urpmi_add_all_media($o)) {
+ my $binary = find { whereis_binary($_, $::prefix) } 'gurpmi2', 'urpmi' or return;
+ run_program::rooted($::prefix, $binary, 'emacs'); # , '--auto-select', '--updates'
}
#- not downing network, even ppp. We don't care much since it is the end of install :)