summaryrefslogtreecommitdiffstats
path: root/mdkapplet-upgrade-helper
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-13 23:14:08 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-13 23:14:08 +0000
commit19edea8b8f17cb77bec95d7d58b284cfd4c24317 (patch)
tree56e93f5a6f8ecec330cd625605548614e1c26e4b /mdkapplet-upgrade-helper
parent38a71400cf0b9b5959a4bd9a7a0b7c6c15d1e635 (diff)
downloadmgaonline-19edea8b8f17cb77bec95d7d58b284cfd4c24317.tar
mgaonline-19edea8b8f17cb77bec95d7d58b284cfd4c24317.tar.gz
mgaonline-19edea8b8f17cb77bec95d7d58b284cfd4c24317.tar.bz2
mgaonline-19edea8b8f17cb77bec95d7d58b284cfd4c24317.tar.xz
mgaonline-19edea8b8f17cb77bec95d7d58b284cfd4c24317.zip
pass new distro version as parameter
Diffstat (limited to 'mdkapplet-upgrade-helper')
-rwxr-xr-xmdkapplet-upgrade-helper8
1 files changed, 5 insertions, 3 deletions
diff --git a/mdkapplet-upgrade-helper b/mdkapplet-upgrade-helper
index 323f4071..29287142 100755
--- a/mdkapplet-upgrade-helper
+++ b/mdkapplet-upgrade-helper
@@ -41,15 +41,17 @@ use Rpmdrake::open_db;
ugtk2::add_icon_path("/usr/share/mdkonline/pixmaps/");
my ($log_file);
+my $new_distro_version;
foreach my $opt (@ARGV) {
if ($opt =~ /--(rpm-root|urpmi-root)=(.*)/) {
$::rpmdrake_options{$1}[0] = $2;
+ } elsif ($opt =~ /--new_distro_version=(.*)/) {
+ $new_distro_version = $1;
}
}
my $root = Rpmdrake::open_db::fast_open_urpmi_db()->{root};
-my $new_distro;
my $product_id = common::parse_LDAP_namespace_structure(cat_("$root/etc/product.id"));
run_program::raw({ detach => 1 }, 'ionice', '-p', $$, '-n7');
@@ -84,7 +86,7 @@ sub upgrade_distro_congratulations() {
gtkadd($w->{window},
gtknew('VBox', children_tight => [
get_banner(),
- gtknew('Label_Left', text => N("Upgrade to Mandriva %s release was successfull.", $new_distro->{version}),
+ gtknew('Label_Left', text => N("Upgrade to Mandriva %s release was successfull.", $new_distro_version),
# explicitely wrap (for 2008.1):
line_wrap => 1,
# workaround infamous 6 years old gnome bug #101968:
@@ -123,7 +125,7 @@ sub upgrade() {
log::explanations("adding urpmi media for new distribution");
my $product_type = lc($product_id->{type}); $product_type =~ s/\s//g;
- my $mirror_list = "http://api.mandriva.com/mirrors/$product_type.$new_distro->{version}.$product_id->{arch}.list?" .
+ my $mirror_list = "http://api.mandriva.com/mirrors/$product_type.$new_distro_version.$product_id->{arch}.list?" .
join(',', 'reason=upgrade', 'upgrade_by=mdkapplet', "upgrade_from=$product_id->{version}");
system('gurpmi.addmedia', '--silent-success', if_($root, "--urpmi-root=$root"), '--distrib', '--mirrorlist', $mirror_list)
and return;