diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-01-14 02:25:13 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-01-14 02:25:13 +0000 |
commit | 40e9a6cdf34436562481587eb43511900cf73931 (patch) | |
tree | cd112ed1823e8268abb2ee8515de820c890188e6 /usr.sbin/pkg_add/pkg_delete | |
parent | 1ddaf5f286b2ad047bc37bb05b9b860c1850f714 (diff) |
`big lock' model: lock the whole db for reading/writing.
design checked with millert@, relying on process termination for unlock
at his suggestion.
Perf optimization: don't try to reinstall installed packages in kitchensink
mode if !-r.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_delete')
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index 6483b0d0d76..977b16b1378 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.85 2005/01/03 01:02:45 espie Exp $ +# $OpenBSD: pkg_delete,v 1.86 2005/01/14 02:25:12 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -95,6 +95,7 @@ if ($opt_B eq '') { $ENV{'PKG_DELETE_EXTRA'} = $state->{extra} ? "Yes" : "No"; +lock_db($opt_n); if (!$opt_x && !$state->{beverbose}) { OpenBSD::ProgressMeter::enable(); } |