1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 class RootConfig(object):
5 """This is used internally by depgraph to track information about a
7 __slots__ = ("root", "setconfig", "sets", "settings", "trees")
10 "ebuild" : "porttree",
12 "installed" : "vartree"
16 for k, v in pkg_tree_map.items():
19 def __init__(self, settings, trees, setconfig):
21 self.settings = settings
22 self.root = self.settings['EROOT']
23 self.setconfig = setconfig
27 self.sets = self.setconfig.getSets()
29 def update(self, other):
31 Shallow copy all attributes from another instance.
33 for k in self.__slots__:
34 setattr(self, k, getattr(other, k))