summaryrefslogtreecommitdiffstats
path: root/urpm/lock.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-24 19:34:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-24 19:34:32 +0000
commit4df7583caa71a35d6d68c373fc0c62d1be6d955b (patch)
treebddf36169b314d82ff20036dea7e47fa4fec5bcd /urpm/lock.pm
parent7a606ec3537b2f465f8e06e99b445c756bfcca8f (diff)
downloadurpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.gz
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.bz2
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.tar.xz
urpmi-4df7583caa71a35d6d68c373fc0c62d1be6d955b.zip
re-sync after the big svn loss
Diffstat (limited to 'urpm/lock.pm')
-rw-r--r--urpm/lock.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/lock.pm b/urpm/lock.pm
index 6c1560ca..0b9cf7f7 100644
--- a/urpm/lock.pm
+++ b/urpm/lock.pm
@@ -17,7 +17,8 @@ my ($LOCK_SH, $LOCK_EX, $LOCK_NB, $LOCK_UN) = (1, 2, 4, 8);
# - lock urpmi db in /
sub rpm_db {
my ($urpm, $b_exclusive) = @_;
- urpm::lock->new($urpm, "$urpm->{root}/$urpm->{statedir}/.RPMLOCK", 'rpm', $b_exclusive);
+ my $f = ($urpm->{root} && !$urpm->{urpmi_root} ? "$urpm->{root}/" : '') . "$urpm->{statedir}/.RPMLOCK";
+ urpm::lock->new($urpm, $f, 'rpm', $b_exclusive);
}
sub urpmi_db {
my ($urpm, $b_exclusive, $b_nofatal) = @_;