summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-17 13:55:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-17 13:55:05 +0000
commit18aac0fd6bb8d73f1219304af48c8e52ec998cde (patch)
treed5e8e44b2d234570b111476e4d3b33aa563813b1
parent2864278acd38b3b4bd5410c2022d21bf3154e933 (diff)
downloadurpmi-18aac0fd6bb8d73f1219304af48c8e52ec998cde.tar
urpmi-18aac0fd6bb8d73f1219304af48c8e52ec998cde.tar.gz
urpmi-18aac0fd6bb8d73f1219304af48c8e52ec998cde.tar.bz2
urpmi-18aac0fd6bb8d73f1219304af48c8e52ec998cde.tar.xz
urpmi-18aac0fd6bb8d73f1219304af48c8e52ec998cde.zip
o fix displaying error message when failing to lock (regression in 5.1)
(thanks to blino)
-rw-r--r--NEWS1
-rw-r--r--urpm/lock.pm4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 9b0deb72..3c010fba 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
- all tools:
o deprecate --curl and --wget in favor of --downloader curl
and --downloader --wget
+ o fix displaying error message when failing to lock (regression in 5.1)
- urpmq:
o add --provides
diff --git a/urpm/lock.pm b/urpm/lock.pm
index aeb0aa3b..ea59a983 100644
--- a/urpm/lock.pm
+++ b/urpm/lock.pm
@@ -60,9 +60,9 @@ sub _lock {
if (!flock($lock->{fh}, $mode | $LOCK_NB)) {
if ($b_wait) {
$lock->{info}(N("%s database locked. waiting...", $lock->{db_name}));
- flock($lock->{fh}, $mode) or $lock->{fatal}(1, N("aborting"));
+ flock($lock->{fh}, $mode) or $lock->{fatal}(N("aborting"));
} else {
- $lock->{fatal}(1, N("%s database locked", $lock->{db_name}));
+ $lock->{fatal}(N("%s database locked", $lock->{db_name}));
}
}
$lock->{locked} = 1;