summaryrefslogtreecommitdiffstats
path: root/mgaapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-06 17:28:57 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-06 17:28:57 +0000
commit8fca0c38d4cb54ecca849d8ecc6d15aec6b81dd6 (patch)
treee711b5f4bdf912a1f06866789e63a1784345780f /mgaapplet
parent1b1a0a4434e2eb4adadd651d5ca3b55a0bcb444c (diff)
downloadmgaonline-8fca0c38d4cb54ecca849d8ecc6d15aec6b81dd6.tar
mgaonline-8fca0c38d4cb54ecca849d8ecc6d15aec6b81dd6.tar.gz
mgaonline-8fca0c38d4cb54ecca849d8ecc6d15aec6b81dd6.tar.bz2
mgaonline-8fca0c38d4cb54ecca849d8ecc6d15aec6b81dd6.tar.xz
mgaonline-8fca0c38d4cb54ecca849d8ecc6d15aec6b81dd6.zip
drop support for Enterprise & PowerPack media (mga#6292)
Diffstat (limited to 'mgaapplet')
-rwxr-xr-xmgaapplet71
1 files changed, 2 insertions, 69 deletions
diff --git a/mgaapplet b/mgaapplet
index 2ed974bd..05e8f4c0 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -113,12 +113,6 @@ my %state = (
urgency => 'low',
tt => []
},
- unconfigured_restricted_media => {
- colour => [ 'bundle' ],
- menu => [ 'add_restricted_media', 'check' ],
- urgency => 'low',
- tt => [ N("An additional package medium is available for your distribution.") ]
- },
disconnected => {
colour => [ 'disconnect' ],
menu => [ 'confNetwork' ],
@@ -204,16 +198,10 @@ my %comm_codes = (
status => 'critical',
log => "Failed to open urpmi database\n",
},
- unconfigured_restricted_media => {
- code => 9,
- status => 'unconfigured_restricted_media',
- log => "Missing restricted media\n",
- },
);
my %actions = (
'update' => { name => N("Install updates"), launch => \&installUpdates },
- 'add_restricted_media' => { name => N("Add additional package medium"), launch => \&prepare_add_restricted },
'check' => { name => N("Check Updates"), launch => \&checkUpdates },
'confNetwork' => { name => N("Configure Network"), launch => \&configNetwork },
'upgrade_distro' => { name => N("Upgrade the system"), launch => \&upgrade },
@@ -227,7 +215,6 @@ $icon->signal_connect(popup_menu => sub {
});
$icon->signal_connect(activate => sub {
my %click_actions = (
- unconfigured_restricted_media => \&prepare_add_restricted,
no_update_medium => \&add_media,
no_enabled_medium => \&add_media,
updates => \&installUpdates,
@@ -364,7 +351,7 @@ sub process_state {
$locked_count = 0;
}
- # busy critical delayed disabled disconnected locked loop_locked new_distribution no_enabled_medium no_more_supported no_update_medium notsupported okay unconfigured_restricted_media update
+ # busy critical delayed disabled disconnected locked loop_locked new_distribution no_enabled_medium no_more_supported no_update_medium notsupported okay update
if (!member($sub_state, qw(okay))) {
go2State($sub_state);
} elsif ($no_more_supported
@@ -779,15 +766,7 @@ sub silentCheck() {
warn ">> need_restart=$need_restart, updates=" . join(', ', @requested_strict) . "\n";
checker_exit('updates');
} else {
- if (!text2bool($local_config{DO_NOT_ASK_FOR_RESTRICTED})) {
- if (is_restricted_media_configured($urpm)) {
- checker_exit('uptodate');
- } else {
- checker_exit('unconfigured_restricted_media');
- }
- } else {
- checker_exit('uptodate');
- }
+ checker_exit('uptodate');
}
} else {
checker_exit('db_not_open');
@@ -910,8 +889,6 @@ sub setState {
} elsif ($state eq 'updates') {
unshift @arr, 'upgrade_distro' if $new_distro;
$bubble->add_action('clicked', N("Install updates"), \&installUpdates);
- } elsif ($state eq 'unconfigured_restricted_media') {
- $bubble->add_action('clicked', N("More Information"), \&prepare_add_restricted);
} elsif (member($state, qw(no_enabled_medium no_update_medium))) {
$bubble->add_action('clicked', N("Add media"), \&add_media);
}
@@ -957,47 +934,3 @@ sub mainQuit() {
Glib::Source->remove($network_timeout) if $network_timeout;
Gtk2->main_quit;
}
-
-sub get_enabled_restricted_media {
- my ($urpm) = @_;
- grep { $_->{name} =~ /restricted/i && !$_->{ignore} } @{$urpm->{media}};
-}
-
-sub is_restricted_media_configured {
- my ($urpm) = @_;
- return 1 if !is_restricted_media_supported();
-
- my @restricted_media = get_enabled_restricted_media($urpm);
- my @names = map { $_->{name} } @restricted_media;
- # we need both 'Restricted' & 'Restricted Updates' media
- # those who did online update trough mgaapplet do not have restricted medium, hence the test for 2 medium:
- @restricted_media >= (urpm::cfg::get_arch() =~ /64/ ? 4 : 2)
- && (grep { /Restricted Updates/ } @names) && (grep { /Restricted/ && !/Updates/ } @names);
-}
-
-sub really_prepare_add_restricted() {
- $mdv_update_pid = run_program::raw({ detach => 1 },
- 'mgaapplet-add-media-helper',
- $product_id->{version});
-}
-
-sub prepare_add_restricted() {
- my $warn_me = text2bool($local_config{DO_NOT_ASK_FOR_RESTRICTED});
- return if $warn_me;
- my $w = new_portable_dialog(N("New medium available"));
- my $res =
- fill_n_run_portable_dialog(
- $w,
- [
- get_banner(N("New medium available")),
- gtknew('Label_Left', text =>
- N("You use '%s' distribution and therefore have privileged access to additional software.",
- translate_product($product_id->{version})) . "\n\n" .
- N("Do you want to install this additional software repository?"), @common),
- gtknew('CheckButton', text => N("Do not ask me next time"), active_ref => \$warn_me),
- create_okcancel($w, N("Next"), N("Cancel")),
- ]);
- setVar('DO_NOT_ASK_FOR_RESTRICTED', bool2text($warn_me));
- $local_config{DO_NOT_ASK_FOR_RESTRICTED} = bool2text($warn_me);
- $res ? really_prepare_add_restricted() : 0;
-}