From 91f39c760a10f388077922c49726b28173109f11 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 13 Nov 2006 23:52:04 +0000 Subject: [PATCH] For bug #154989, use a single lock on /var/db/pkg since finer grained locking is unnecessary and often insufficient. svn path=/main/trunk/; revision=5027 --- pym/portage.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index 13646b2fb..3e7777ab8 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6024,8 +6024,7 @@ class dblink: self.dbtmpdir = self.dbcatdir+"/-MERGING-"+pkg self.dbdir = self.dbpkgdir - self.lock_pkg = None - self.lock_tmp = None + self._lock_vdb = None self.lock_num = 0 # Count of the held locks on the db. self.settings = mysettings @@ -6043,15 +6042,13 @@ class dblink: def lockdb(self): if self.lock_num == 0: - self.lock_pkg = portage_locks.lockdir(self.dbpkgdir) - self.lock_tmp = portage_locks.lockdir(self.dbtmpdir) + self._lock_vdb = portage_locks.lockdir(self.dbroot) self.lock_num += 1 def unlockdb(self): self.lock_num -= 1 if self.lock_num == 0: - portage_locks.unlockdir(self.lock_tmp) - portage_locks.unlockdir(self.lock_pkg) + portage_locks.unlockdir(self._lock_vdb) def getpath(self): "return path to location of db information (for >>> informational display)" -- 2.26.2