aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Urpmi.pm
diff options
context:
space:
mode:
authorMarcelo Leitner <mrl@mandriva.com>2008-02-20 18:51:23 +0000
committerMarcelo Leitner <mrl@mandriva.com>2008-02-20 18:51:23 +0000
commitb29b116f7d3f32a14257a4a55169d8ce11d71267 (patch)
tree0ccacde1ed66014942f53372dd5ad2b05f2d18db /lib/Iurt/Urpmi.pm
parent0d277bad9693d75f62032946aa6d7aa24956aaa5 (diff)
downloadiurt-b29b116f7d3f32a14257a4a55169d8ce11d71267.tar
iurt-b29b116f7d3f32a14257a4a55169d8ce11d71267.tar.gz
iurt-b29b116f7d3f32a14257a4a55169d8ce11d71267.tar.bz2
iurt-b29b116f7d3f32a14257a4a55169d8ce11d71267.tar.xz
iurt-b29b116f7d3f32a14257a4a55169d8ce11d71267.zip
- Block two too dangerous pkill commands.
- Enhance logging for another pkill command.
Diffstat (limited to 'lib/Iurt/Urpmi.pm')
-rw-r--r--lib/Iurt/Urpmi.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index 5d8fadc..99442dc 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -246,9 +246,10 @@ sub add_packages {
sleep 30;
$self->{wait_limit}++;
if ($self->{wait_limit} > 10) {
- $self->{wait_limit} = 0;
- system(qq(sudo pkill -9 urpmi &>/dev/null));
- return;
+ #$self->{wait_limit} = 0;
+ # <mrl> We can't shoot such command, it's too powerfull.
+ #system(qq(sudo pkill -9 urpmi &>/dev/null));
+ return 0;
}
1;
} },)) {
@@ -373,8 +374,11 @@ sub wait_urpmi {
plog("WARNING: urpmi database locked, waiting...") if $run->{debug};
sleep 30;
$self->{wait_limit}++;
- if ($self->{wait_limit} > 8) {
- $self->{wait_limit} = 0; system(qq(sudo pkill -9 urpmi &>/dev/null));
+ if ($self->{wait_limit} > 8) {
+ #$self->{wait_limit} = 0;
+ # <mrl> We can't shoot such command, it's too powerfull.
+ #system(qq(sudo pkill -9 urpmi &>/dev/null));
+ return 0;
}
}