summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-25 14:09:18 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-25 14:09:18 +0000
commit8efe020dfe50d96d9bad077e67ba6bbe9a407322 (patch)
tree3438c81f8545476ac0bc3f73dcfcf399f3cf0e21
parent2e7aa2aacc6b22725fad83196e7835f0c3f28e62 (diff)
downloadcontrol-center-8efe020dfe50d96d9bad077e67ba6bbe9a407322.tar
control-center-8efe020dfe50d96d9bad077e67ba6bbe9a407322.tar.gz
control-center-8efe020dfe50d96d9bad077e67ba6bbe9a407322.tar.bz2
control-center-8efe020dfe50d96d9bad077e67ba6bbe9a407322.tar.xz
control-center-8efe020dfe50d96d9bad077e67ba6bbe9a407322.zip
provide the URL (needs mdkonline > 2.77.15.1 in cooker)
-rw-r--r--NEWS1
-rwxr-xr-xlib/MDV/Control_Center.pm22
2 files changed, 21 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 6a5c9d03..697392d8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- extended maintenance tool:
o fix providing the right version
+ o provide the URL
Version 12.18 - 22 January 2010, Thierry Vignaud
diff --git a/lib/MDV/Control_Center.pm b/lib/MDV/Control_Center.pm
index 6b36bea1..f8188783 100755
--- a/lib/MDV/Control_Center.pm
+++ b/lib/MDV/Control_Center.pm
@@ -36,6 +36,22 @@ our @EXPORT = qw(
our ($version) = cat_("/etc/mandrakelinux-release") =~ /\b(\d+\.\d+)/;
+my $extended_maintenance_url;
+
+eval {
+ use lib qw(/usr/lib/libDrakX/drakfirsttime);
+ use mdkonline;
+ require Rpmdrake::open_db;
+ get_product_id();
+ my @distros = get_distro_list();
+ return if !@distros;
+ my $current_apimdv_distro = find_current_distro(@distros);
+ use Data::Dumper; warn Dumper $current_apimdv_distro;
+ $extended_maintenance_url = $current_apimdv_distro->{'extended-maintenance'};
+};
+if (my $err = $@) {
+ warn "failed to retrieve distro list: $err\n";
+}
#-------------------------------------------------------------
# paths
@@ -604,13 +620,15 @@ our %programs =
icon => 'rpmdrake-mdk',
},
+
+ if_($extended_maintenance_url,
"Extended Maintenance" =>
{
- binary => "$sbindir/mdkapplet-extended-maintenance-helper $version",
+ binary => "$sbindir/mdkapplet-extended-maintenance-helper $version $extended_maintenance_url",
embedded => 1,
description => N("Access to extended maintenance"),
icon => 'extended_maintenance',
- },
+ }),
"Tomoyo Policy" =>