summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-01 16:13:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-01 16:13:40 +0000
commit73e9459062f85bca8adef6976df8d4a6f2dbbbe0 (patch)
treeeabc1b7087d327714d1837a563fdaa75a137387a /perl-install/any.pm
parentf9b8c020f93d96f52c734eba139e06b59d6a820f (diff)
downloaddrakx-73e9459062f85bca8adef6976df8d4a6f2dbbbe0.tar
drakx-73e9459062f85bca8adef6976df8d4a6f2dbbbe0.tar.gz
drakx-73e9459062f85bca8adef6976df8d4a6f2dbbbe0.tar.bz2
drakx-73e9459062f85bca8adef6976df8d4a6f2dbbbe0.tar.xz
drakx-73e9459062f85bca8adef6976df8d4a6f2dbbbe0.zip
- keep in $o->{previous_release} the info about upgraded /etc/release,
and pass "reason" and version to urpmi.addmedia - we also parse {version} field out of /etc/release
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index ee5322d79..e5d62371f 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -841,7 +841,7 @@ sub sessions_with_order() {
}
sub urpmi_add_all_media {
- my ($in) = @_;
+ my ($in, $o_previous_release) = @_;
my $binary = find { whereis_binary($_, $::prefix) } 'gurpmi.addmedia', 'urpmi.addmedia' or return;
@@ -855,6 +855,13 @@ sub urpmi_add_all_media {
mygtk2::destroy_previous_popped_and_reuse_window();
mygtk2::flush();
}
+
+ my $reason = join(',', $o_previous_release ?
+ ('reason=upgrade', 'upgrade_by=drakx', "upgrade_from=$o_previous_release->{version}") :
+ 'reason=install');
+ log::l("URPMI_ADDMEDIA_REASON $reason");
+ local $ENV{URPMI_ADDMEDIA_REASON} = $reason;
+
run_program::rooted($::prefix, $binary, '--distrib', '--mirrorlist', '$MIRRORLIST');
}