From edf5a3bbff958814e29df78f755390cfa7e2db40 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 20 Mar 2006 16:58:10 +0000 Subject: Lock the urpmi db when adding a new media (previously it was locked only on update) --- urpm.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index e394e265..328ac985 100644 --- a/urpm.pm +++ b/urpm.pm @@ -686,6 +686,7 @@ sub add_medium { #- make sure configuration has been read. $urpm->{media} or $urpm->read_config; + $options{nolock} or $urpm->exlock_urpmi_db; #- if a medium with that name has already been found, we have to exit now my $medium; @@ -755,6 +756,7 @@ sub add_medium { } } + $options{nolock} or $urpm->unlock_urpmi_db; $name; } -- cgit v1.2.1