summaryrefslogtreecommitdiffstats
path: root/urpmf
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-13 13:47:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-13 13:47:52 +0000
commita89d4cb513f5df2942ec1ebf504ec1338bc9ff59 (patch)
tree4f89b78bb126eb3539ca9ba75f04e55e754a7e23 /urpmf
parent404c7e99a6a75fbebb05f7e3c50837b54d4ef146 (diff)
downloadurpmi-a89d4cb513f5df2942ec1ebf504ec1338bc9ff59.tar
urpmi-a89d4cb513f5df2942ec1ebf504ec1338bc9ff59.tar.gz
urpmi-a89d4cb513f5df2942ec1ebf504ec1338bc9ff59.tar.bz2
urpmi-a89d4cb513f5df2942ec1ebf504ec1338bc9ff59.tar.xz
urpmi-a89d4cb513f5df2942ec1ebf504ec1338bc9ff59.zip
Allow to work even if urpmi is locked (but warn in this case)
Diffstat (limited to 'urpmf')
-rwxr-xr-xurpmf8
1 files changed, 6 insertions, 2 deletions
diff --git a/urpmf b/urpmf
index bdbbcc6f..4071406e 100755
--- a/urpmf
+++ b/urpmf
@@ -129,8 +129,12 @@ if ($env) {
$urpm->{statedir} = $env;
}
-# TODO - necessary to lock ? why ?
-$urpm->shlock_urpmi_db;
+{
+ #- lock to avoid concurrent media updates,
+ #- but don't die if it doesn't work
+ local $urpm->{fatal} = sub { printf STDERR "%s\n", $_[0] };
+ $urpm->shlock_urpmi_db;
+}
my $use_hdlist = ($params{description} ||
$params{sourcerpm} || $params{packager} || $params{buildhost} ||
$params{url} || $params{files});