From ec82d7615fafa6d11f680fac76d9a2f5664183b3 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 26 Jan 2010 16:48:23 +0000 Subject: retrieve product URL instead of relying on caller to provide it (thus preventing mcc to ping api.mandriva.com on each startup) --- mdkapplet-extended-maintenance-helper | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mdkapplet-extended-maintenance-helper') diff --git a/mdkapplet-extended-maintenance-helper b/mdkapplet-extended-maintenance-helper index bb12d4a4..ab75fe14 100755 --- a/mdkapplet-extended-maintenance-helper +++ b/mdkapplet-extended-maintenance-helper @@ -63,6 +63,14 @@ get_extmaint_authentication(); ugtk2::exit(0); +sub get_extended_maintenance_url() { + require Rpmdrake::open_db; + get_product_id(); + my @distros = get_distro_list(); + return if !@distros; + my $current_apimdv_distro = find_current_distro(@distros); + $current_apimdv_distro->{'extended-maintenance'}; +} sub get_extmaint_authentication() { my $w = ugtk2->new(N("Adding an additional package medium"), width => $width + 20); @@ -71,6 +79,13 @@ sub get_extmaint_authentication() { $password_w = gtknew('Entry'); $password_w->set_visibility(0); + my $url = eval { get_extended_maintenance_url() }; + if (my $err = $@) { + interactive->vnew->ask_warn(N("Error"), N("Failure while retrieving distributions list:") + . "\n$err"); + return; + } + my $res = fill_n_run_portable_dialog( $w, -- cgit v1.2.1