summaryrefslogtreecommitdiffstats
path: root/mgaapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-06 17:29:00 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-06 17:29:00 +0000
commitac30a583ee0c8686df23a8923b25537a9817fdcb (patch)
tree9bfdb66ff69810a5c13009031085b98570531ff6 /mgaapplet
parent8fca0c38d4cb54ecca849d8ecc6d15aec6b81dd6 (diff)
downloadmgaonline-ac30a583ee0c8686df23a8923b25537a9817fdcb.tar
mgaonline-ac30a583ee0c8686df23a8923b25537a9817fdcb.tar.gz
mgaonline-ac30a583ee0c8686df23a8923b25537a9817fdcb.tar.bz2
mgaonline-ac30a583ee0c8686df23a8923b25537a9817fdcb.tar.xz
mgaonline-ac30a583ee0c8686df23a8923b25537a9817fdcb.zip
drop support for extended maintenance
Diffstat (limited to 'mgaapplet')
-rwxr-xr-xmgaapplet87
1 files changed, 6 insertions, 81 deletions
diff --git a/mgaapplet b/mgaapplet
index 05e8f4c0..b6717b17 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -107,12 +107,6 @@ my %state = (
urgency => 'low',
tt => []
},
- extended_support_is_enabled => {
- colour => [ 'okay' ],
- menu => [ 'check' ],
- urgency => 'low',
- tt => []
- },
disconnected => {
colour => [ 'disconnect' ],
menu => [ 'confNetwork' ],
@@ -140,11 +134,6 @@ my %state = (
menu => [],
tt => [ N_("Release not supported (too old release, or development release)") ]
},
- end_of_extended_support => {
- colour => [ 'disabled' ],
- menu => [],
- tt => [ get_obsolete_message_() ]
- },
no_update_medium => {
colour => [ 'noconf' ],
menu => [ 'check' ],
@@ -243,7 +232,7 @@ my ($download_dir, $download_all);
$download_dir = $temp_urpm->{cachedir};
}
-my ($new_distro, $no_more_supported, $extended_maintenance_url, $extended_maintenance_end);
+my ($new_distro, $no_more_supported);
my ($current_apimdv_distro);
get_product_id();
@@ -274,13 +263,6 @@ Gtk2->main;
ugtk2::exit(0);
-sub is_extended_support_not_ended() {
- return if !is_extmaint_supported();
- require POSIX;
- my $d = POSIX::strftime("%G%m%d", localtime(time()));
- $d < $extended_maintenance_end;
-}
-
sub is_there_a_new_distributions() {
# sanity check for cooker/cauldron:
@@ -305,17 +287,12 @@ sub is_there_a_new_distributions() {
}
$current_apimdv_distro = find_current_distro(@distros);
- $no_more_supported = $current_apimdv_distro->{obsoleted_by} if !is_extmaint_supported();
- ($extended_maintenance_url, $extended_maintenance_end) = @$current_apimdv_distro{qw(extended-maintenance extended-maintenance-end)};
+ $no_more_supported = $current_apimdv_distro->{obsoleted_by};
refresh_no_more_supported_msg();
if ($no_more_supported) {
$new_distro = find { $_->{version} eq $no_more_supported } @distros;
- return if is_extended_support_not_ended();
}
- # no if we're using the extended maintenance:
- return if is_extended_support_not_ended();
-
if ($new_distribution && $new_distribution->{version} ne $product_id->{version}) {
$new_distro = $new_distribution;
log::explanations(sprintf("new '%s' distribution was released on %s", $new_distro->{version}, $new_distro->{release_date}));
@@ -330,8 +307,6 @@ my ($mdv_update_pid, $checker_pid, $media_manager_pid, $locked_count);
sub clean_distro_cache() {
undef $new_distro;
undef $no_more_supported;
- undef $extended_maintenance_url;
- undef $extended_maintenance_end;
}
sub is_false {
@@ -355,20 +330,8 @@ sub process_state {
if (!member($sub_state, qw(okay))) {
go2State($sub_state);
} elsif ($no_more_supported
- && !text2bool($local_config{DO_NOT_ASK_FOR_NO_MORE_SUPPORTED})
- && !text2bool($config{EXTENDED_SUPPORT})
- && !text2bool($local_config{EXTENDED_SUPPORT_OFFERED})) {
+ && !text2bool($local_config{DO_NOT_ASK_FOR_NO_MORE_SUPPORTED})) {
go2State('no_more_supported');
- } elsif ($current_apimdv_distro->{obsoleted_by} && text2bool($config{EXTENDED_SUPPORT})
- && is_extmaint_supported()
- && !text2bool($local_config{EXTENDED_SUPPORT_SPLASHED})) {
- $state{extended_support_is_enabled}{tt}[0] =
- N("Basic maintenance for this distribution has expired. Thanks to your subscription to extended maintenance, your system will be kept up to date until %s", iso8601_date_to_locale($extended_maintenance_end));
- go2State('extended_support_is_enabled');
- setVar('EXTENDED_SUPPORT_SPLASHED', bool2yesno(1));
- # FIXME: just drop this state once upgrade from 2009.0 has been tested:
- } elsif (is_extmaint_supported() && !is_extended_support_not_ended()) {
- go2State('end_of_extended_support');
} elsif ($new_distro && is_false($config{DO_NOT_ASK_FOR_DISTRO_UPGRADE})
&& is_false($local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE})) {
go2State('new_distribution');
@@ -488,19 +451,7 @@ sub get_obsolete_message() {
sub refresh_no_more_supported_msg() {
my $basic_msg = get_obsolete_message_();
my $distro = N("Mageia");
- my $msg;
-
- # is extended maintenance available?
- if ($extended_maintenance_url) {
- if ($no_more_supported eq 'none') {
- $msg = N("You should get extended maintenance.");
- } else {
- $msg = N("You should either get extended maintenance or upgrade to a newer version of the %s distribution.",
- $distro);
- }
- } else {
- $msg = N("You should upgrade to a newer version of the %s distribution.", $distro);
- }
+ my $msg = N("You should upgrade to a newer version of the %s distribution.", $distro);
$state{no_more_supported}{tt}[0] = join(' ', $basic_msg, $msg);
}
@@ -511,25 +462,12 @@ sub no_more_supported_choice() {
local $mgaapplet_gui::width = 580;
my $w = new_portable_dialog(N("Your distribution is no longer supported"));
my ($b1, $b2);
- my $choice = $extended_maintenance_url ? 'extended' : ($no_more_supported ne 'none' ? 'upgrade' : undef);
+ my $choice = $no_more_supported ne 'none' ? 'upgrade' : undef;
my @widgets = (
- get_banner(N("Extended Maintenance")),
+ get_banner(N("New version of Mageia distribution")),
gtknew('Label_Left',
text => get_obsolete_message() . "\n", @common),
- if_($extended_maintenance_url,
- $b1 = gtknew('RadioButton',
- text => N("Purchase a maintenance extension for this version (%s) and keep it running until %s.",
- $product_id->{version},
- iso8601_date_to_locale($extended_maintenance_end)),
-
- toggled => sub {
- ($choice, $warn_me) = ('extended', undef) if $_[0]->get_active;
- },
-
- ),
- gtknew('HSeparator'),
- ),
($no_more_supported ne 'none' ? (
gtknew('VBox', children_tight => [
$b2 = gtknew('RadioButton',
@@ -562,7 +500,6 @@ sub no_more_supported_choice() {
my $res = fill_n_run_portable_dialog($w, \@widgets);
- setVar('EXTENDED_SUPPORT_OFFERED', bool2yesno(1));
setVar('DO_NOT_ASK_FOR_NO_MORE_SUPPORTED', bool2text($warn_me));
$local_config{DO_NOT_ASK_FOR_NO_MORE_SUPPORTED} = bool2text($warn_me);
if ($res) {
@@ -580,24 +517,12 @@ sub no_more_supported() {
my $choice = no_more_supported_choice();
if ($choice eq 'upgrade') {
really_confirm_upgrade() and real_upgrade();
- } elsif ($choice eq 'extended') {
- get_extended_maintenance();
} elsif ($choice eq 'nothing') {
$icon->set_visible(0);
}
undef $no_more_supported_wip;
}
-
-sub get_extended_maintenance() {
- $mdv_update_pid = fork_exec('mgaapplet-add-media-helper',
- if_($::testing, '--testing'),
- if_($root, "--urpmi-root=$root"),
- '--product=extended',
- $product_id->{version});
-}
-
-
sub really_confirm_upgrade() {
local $mygtk2::left_padding = 0;
my $w = ugtk2->new(N("New version of Mageia distribution"), width => $width + 20);