diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-05-05 10:21:43 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-05-05 10:21:43 -0700 |
commit | 2fc0237f7ecda61abebd46bb7dc9f173bbed8868 (patch) | |
tree | ac72ccb9b4a355547f2db41834f1ba735ac26509 /pym/_emerge/RootConfig.py | |
parent | 4602463a7d577c8c4534f2a675182e02ba93e570 (diff) | |
download | portage-2fc0237f7ecda61abebd46bb7dc9f173bbed8868.tar.gz portage-2fc0237f7ecda61abebd46bb7dc9f173bbed8868.tar.bz2 portage-2fc0237f7ecda61abebd46bb7dc9f173bbed8868.zip |
depgraph: simplify break_refsv2.2.0_alpha31
Diffstat (limited to 'pym/_emerge/RootConfig.py')
-rw-r--r-- | pym/_emerge/RootConfig.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pym/_emerge/RootConfig.py b/pym/_emerge/RootConfig.py index 110f11694..d84f10889 100644 --- a/pym/_emerge/RootConfig.py +++ b/pym/_emerge/RootConfig.py @@ -1,9 +1,10 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 class RootConfig(object): """This is used internally by depgraph to track information about a particular $ROOT.""" + __slots__ = ("root", "setconfig", "sets", "settings", "trees") pkg_tree_map = { "ebuild" : "porttree", @@ -24,3 +25,10 @@ class RootConfig(object): self.sets = {} else: self.sets = self.setconfig.getSets() + + def update(self, other): + """ + Shallow copy all attributes from another instance. + """ + for k in self.__slots__: + setattr(self, k, getattr(other, k)) |