From 6aed7e5429cab61514fe2eb3cacad3d11462cd5f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 23 Nov 2006 10:49:51 +0000 Subject: - move lock functions to a full blown module - handle get_exclusive and release_exclusive on existing lock, *but* don't use it for now! (not useful) - remove urpmi_db locking from add_medium and update_media - move rpm_db locking into _read_cachedir_pubkey - update_media: restrict rpm_db exclusive locking to parse_pubkeys - urpmi: move locking rpm_db near its use - handle lock directly in urpmi.addmedia, urpmi.update, urpme, urpmf - log locking/unlocking --- urpmi.addmedia | 1 + 1 file changed, 1 insertion(+) (limited to 'urpmi.addmedia') diff --git a/urpmi.addmedia b/urpmi.addmedia index 1fbded3b..29fe3170 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -123,6 +123,7 @@ if (!-e $urpm->{config}) { $urpm->{error}(N("Will create config file [%s]", $urpm->{config})); open my $_f, '>', $urpm->{config} or $urpm->{fatal}(6, N("Can't create config file [%s]", $urpm->{config})); } +my $_urpmi_lock = urpm::lock::urpmi_db($urpm, 'exclusive'); urpm::media::read_config($urpm); if ($options{distrib}) { -- cgit v1.2.1