From: Zac Medico Date: Wed, 5 Dec 2007 08:46:03 +0000 (-0000) Subject: Make SetConfig.getSets() return a copy of the psets attribute X-Git-Tag: v2.2_pre1~221 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bfea56f256dfbc5d945d0a8d28e3e586d5734f98;p=portage.git Make SetConfig.getSets() return a copy of the psets attribute instead of a direct reference. Fix the to stop relying on having the direct reference. svn path=/main/trunk/; revision=8849 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 97b273177..b0ad6391b 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -6908,7 +6908,7 @@ def emerge_main(): if myaction in ("clean", "config", "depclean", "info", "prune", "unmerge", None): root_config = trees[settings["ROOT"]]["root_config"] setconfig = root_config.setconfig - sets = root_config.sets + sets = setconfig.getSets() # emerge relies on the existance of sets with names "world" and "system" required_sets = ("world", "system") if "system" not in sets: @@ -6918,6 +6918,7 @@ def emerge_main(): if "world" not in sets: from portage.sets.files import WorldSet sets["world"] = WorldSet(root_config.root) + setconfig.psets.update(sets) for s in required_sets: if s not in sets: msg = ["emerge: incomplete set configuration, " + \ diff --git a/pym/portage/sets/__init__.py b/pym/portage/sets/__init__.py index 2d36f4814..5f82b69b7 100644 --- a/pym/portage/sets/__init__.py +++ b/pym/portage/sets/__init__.py @@ -74,7 +74,7 @@ class SetConfig(SafeConfigParser): def getSets(self): self._parse() - return self.psets + return self.psets.copy() def getSetAtoms(self, setname, ignorelist=None): myset = self.getSets()[setname]