svn path=/main/trunk/; revision=14774
# Distributed under the terms of the GNU General Public License v2
# $Id$
+import sys
import portage
class PackageVirtualDbapi(portage.dbapi):
obj._cpv_map = self._cpv_map.copy()
return obj
+ def __bool__(self):
+ return bool(self._cpv_map)
+
+ if sys.hexversion < 0x3000000:
+ __nonzero__ = __bool__
+
def __iter__(self):
return iter(self._cpv_map.values())
"--buildpkgonly" not in self._frozen_config.myopts
fake_vartree = self._frozen_config.trees[myroot]["vartree"]
- fake_vartree.sync()
+ if not fake_vartree.dbapi:
+ # This needs to be called for the first depgraph, but not for
+ # backtracking depgraphs that share the same frozen_config.
+ fake_vartree.sync()
if preload_installed_pkgs:
vardb = fake_vartree.dbapi