summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-07-31 16:34:58 +0000
committerFrancois Pons <fpons@mandriva.com>2003-07-31 16:34:58 +0000
commitad142eb0b7ef93c0918c33bcc5897142207e509c (patch)
treead03dfdb9935a244a31c7bed0057275e4ac3be40 /urpm.pm
parentef3761015754803621094dfa6e6d833f0fe7effa (diff)
downloadurpmi-ad142eb0b7ef93c0918c33bcc5897142207e509c.tar
urpmi-ad142eb0b7ef93c0918c33bcc5897142207e509c.tar.gz
urpmi-ad142eb0b7ef93c0918c33bcc5897142207e509c.tar.bz2
urpmi-ad142eb0b7ef93c0918c33bcc5897142207e509c.tar.xz
urpmi-ad142eb0b7ef93c0918c33bcc5897142207e509c.zip
fixed shlock_urpmi_db to be shared and not waiting.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 636a1d06..17fa8fc7 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -2482,11 +2482,11 @@ sub shlock_urpmi_db {
my ($urpm) = @_;
#- avoid putting a require on Fcntl ':flock' (which is perl and not perl-base).
- my $LOCK_EX = 2;
+ my ($LOCK_SH, $LOCK_NB) = (1, 4);
#- lock urpmi database, but keep lock to wait for an urpmi.update to finish.
open LOCK_FILE, ">$urpm->{statedir}/.LOCK";
- flock LOCK_FILE, $LOCK_EX or $urpm->{fatal}(7, N("urpmi database locked"));
+ flock LOCK_FILE, $LOCK_SH|$LOCK_NB or $urpm->{fatal}(7, N("urpmi database locked"));
}
sub unlock_urpmi_db {
my ($_urpm) = @_;