summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-02-11 16:07:24 +0000
committerThierry Vignaud <tv@mandriva.org>2009-02-11 16:07:24 +0000
commit276fdb3a35563ffe831d21bd68b825c0c2318e30 (patch)
tree7c733dd7fd917e8ad2da1083122dfe6959cdddc2
parentf80778e719165c404e4b011373fe673319ea59dd (diff)
downloadmgaonline-276fdb3a35563ffe831d21bd68b825c0c2318e30.tar
mgaonline-276fdb3a35563ffe831d21bd68b825c0c2318e30.tar.gz
mgaonline-276fdb3a35563ffe831d21bd68b825c0c2318e30.tar.bz2
mgaonline-276fdb3a35563ffe831d21bd68b825c0c2318e30.tar.xz
mgaonline-276fdb3a35563ffe831d21bd68b825c0c2318e30.zip
(harvester) only warn about locked urpmi DB after 10 tries
(maybe this should be made configurable in config file?)
-rw-r--r--NEWS1
-rwxr-xr-xmdkapplet14
2 files changed, 14 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 3937f8fd..b83720eb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
- mdkapplet
o do not hide urpmi.update arguments (#47002)
o be nicer with CPU (more efficient system power usage)
+ o only warn about locked urpmi DB after 10 tries
Version 2.72 - 16 December 2008
diff --git a/mdkapplet b/mdkapplet
index 1d47b90b..73117c68 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -125,6 +125,12 @@ my %state = (
tt => [ N_("urpmi database locked") ],
do_not_use_bubble => 1,
},
+ loop_locked => {
+ colour => [ 'noconf' ],
+ changes => [ 'okay', 'busy', 'critical', 'disconnected' ],
+ menu => [ 'check' ],
+ tt => [ N_("urpmi database locked") ],
+ },
notsupported => {
colour => [ 'disabled' ],
changes => [ 'okay', 'busy', 'critical', 'error' ],
@@ -321,7 +327,7 @@ sub is_there_a_new_distributions() {
}
-my ($mdv_update_pid, $checker_pid, $media_manager_pid);
+my ($mdv_update_pid, $checker_pid, $media_manager_pid, $locked_count);
# Signal management
sub harvester {
@@ -344,6 +350,12 @@ sub harvester {
&& $local_config{DO_NOT_ASK_FOR_DISTRO_UPGRADE} !~ /^true$/i) {
go2State('new_distribution');
} else {
+ if ($sub_state eq 'locked') {
+ $locked_count++;
+ $sub_state = 'loop_locked' if $locked_count > 10;
+ } else {
+ $locked_count = 0;
+ }
go2State($sub_state);
}
}