summaryrefslogtreecommitdiffstats
path: root/mdkapplet-extended-maintenance-helper
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-26 16:48:23 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-26 16:48:23 +0000
commitec82d7615fafa6d11f680fac76d9a2f5664183b3 (patch)
treed6b4cb956e4e84b91780539b22cd0e113f878a4c /mdkapplet-extended-maintenance-helper
parent0483821216444d3514e9bb678dee978447447739 (diff)
downloadmgaonline-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)
Diffstat (limited to 'mdkapplet-extended-maintenance-helper')
-rwxr-xr-xmdkapplet-extended-maintenance-helper15
1 files changed, 15 insertions, 0 deletions
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,