summaryrefslogtreecommitdiffstats
path: root/gurpmi2
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-23 10:49:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-23 10:49:51 +0000
commit6aed7e5429cab61514fe2eb3cacad3d11462cd5f (patch)
tree514c973cd20132c03770c87eca82ab248e10446b /gurpmi2
parent0bf8f352836b0e1b584638789558246871912a87 (diff)
downloadurpmi-6aed7e5429cab61514fe2eb3cacad3d11462cd5f.tar
urpmi-6aed7e5429cab61514fe2eb3cacad3d11462cd5f.tar.gz
urpmi-6aed7e5429cab61514fe2eb3cacad3d11462cd5f.tar.bz2
urpmi-6aed7e5429cab61514fe2eb3cacad3d11462cd5f.tar.xz
urpmi-6aed7e5429cab61514fe2eb3cacad3d11462cd5f.zip
- 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
Diffstat (limited to 'gurpmi2')
-rwxr-xr-xgurpmi29
1 files changed, 4 insertions, 5 deletions
diff --git a/gurpmi2 b/gurpmi2
index 300034aa..737e92d1 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -121,9 +121,8 @@ sub configure_urpm() {
$w->run;
$w->destroy;
};
- $rpm_lock = urpm::sys::lock_rpm_db($urpm, 'exclusive');
- $urpmi_lock = urpm::sys::lock_urpmi_db($urpm);
- urpm::media::configure($urpm,
+ $rpm_lock = urpm::lock::rpm_db($urpm, 'exclusive');
+ $urpmi_lock = urpm::media::configure($urpm,
root => $gurpmi::options{root},
media => $gurpmi::options{media},
searchmedia => $gurpmi::options{searchmedia},
@@ -339,7 +338,7 @@ sub do_install_3 () {
} else {
$progress_label->set_label(N("Installation finished"));
}
- urpm::sys::unlock($urpmi_lock);
- urpm::sys::unlock($rpm_lock);
+ $urpmi_lock->unlock;
+ $rpm_lock->unlock;
urpm::removable::try_umounting_removables($urpm);
}