self.settings = real_vartree.settings
self.dbapi = portage.fakedbapi(settings=real_vartree.settings)
vdb_path = os.path.join(self.root, portage.VDB_PATH)
+ try:
+ # At least the parent needs to exist for the lock file.
+ portage_util.ensure_dirs(vdb_path)
+ except portage_exception.PortageException:
+ pass
vdb_lock = None
try:
if os.access(vdb_path, os.W_OK):
xterm_titles = "notitles" not in settings.features
vdb_path = os.path.join(settings["ROOT"], portage.VDB_PATH)
+ try:
+ # At least the parent needs to exist for the lock file.
+ portage_util.ensure_dirs(vdb_path)
+ except portage_exception.PortageException:
+ pass
vdb_lock = None
try:
if os.access(vdb_path, os.W_OK):
def lockdb(self):
if self._lock_vdb:
raise AssertionError("Lock already held.")
+ # At least the parent needs to exist for the lock file.
+ portage_util.ensure_dirs(self.dbroot)
self._lock_vdb = portage_locks.lockdir(self.dbroot)
def unlockdb(self):