diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-01-26 16:48:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-01-26 16:48:23 +0000 |
commit | ec82d7615fafa6d11f680fac76d9a2f5664183b3 (patch) | |
tree | d6b4cb956e4e84b91780539b22cd0e113f878a4c | |
parent | 0483821216444d3514e9bb678dee978447447739 (diff) | |
download | mgaonline-ec82d7615fafa6d11f680fac76d9a2f5664183b3.tar mgaonline-ec82d7615fafa6d11f680fac76d9a2f5664183b3.tar.gz mgaonline-ec82d7615fafa6d11f680fac76d9a2f5664183b3.tar.bz2 mgaonline-ec82d7615fafa6d11f680fac76d9a2f5664183b3.tar.xz mgaonline-ec82d7615fafa6d11f680fac76d9a2f5664183b3.zip |
retrieve product URL instead of relying on caller to provide it
(thus preventing mcc to ping api.mandriva.com on each startup)
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | mdkapplet-extended-maintenance-helper | 15 |
2 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,6 @@ +- mdkapplet-extended-maintenance-helper + o retrieve product URL instead of relying on caller to provide it + Version 2.77.15.2 - 25 January 2010, Thierry Vignaud - mdkapplet 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, |