diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-11-13 23:52:04 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-11-13 23:52:04 +0000 |
commit | 91f39c760a10f388077922c49726b28173109f11 (patch) | |
tree | a255a1ba04dcbbbd5c7ad52f096d73179cc3fae7 | |
parent | c7cb5415524edecc01f13f97301f500cf58f5d19 (diff) | |
download | portage-91f39c760a10f388077922c49726b28173109f11.tar.gz portage-91f39c760a10f388077922c49726b28173109f11.tar.bz2 portage-91f39c760a10f388077922c49726b28173109f11.zip |
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
-rw-r--r-- | pym/portage.py | 9 |
1 files 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)" |