diff options
-rw-r--r-- | pym/_emerge/create_world_atom.py | 10 | ||||
-rw-r--r-- | pym/portage/_sets/files.py | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/pym/_emerge/create_world_atom.py b/pym/_emerge/create_world_atom.py index 54964186c..d0141f7d8 100644 --- a/pym/_emerge/create_world_atom.py +++ b/pym/_emerge/create_world_atom.py @@ -1,6 +1,8 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +from portage.dep import _repo_separator + def create_world_atom(pkg, args_set, root_config): """Create a new atom for the world file if one does not exist. If the argument atom is precise enough to identify a specific slot then a slot @@ -14,6 +16,8 @@ def create_world_atom(pkg, args_set, root_config): return None cp = arg_atom.cp new_world_atom = cp + if arg_atom.repo: + new_world_atom += _repo_separator + arg_atom.repo sets = root_config.sets portdb = root_config.trees["porttree"].dbapi vardb = root_config.trees["vartree"].dbapi @@ -64,11 +68,13 @@ def create_world_atom(pkg, args_set, root_config): matched_slots.add(mydb.aux_get(cpv, ["SLOT"])[0]) if len(matched_slots) == 1: new_world_atom = slot_atom + if arg_atom.repo: + new_world_atom += _repo_separator + arg_atom.repo if new_world_atom == sets["selected"].findAtomForPackage(pkg): # Both atoms would be identical, so there's nothing to add. return None - if not slotted: + if not slotted and not arg_atom.repo: # Unlike world atoms, system atoms are not greedy for slots, so they # can't be safely excluded from world if they are slotted. system_atom = sets["system"].findAtomForPackage(pkg) diff --git a/pym/portage/_sets/files.py b/pym/portage/_sets/files.py index 8c8aeef4b..f19ecf6ce 100644 --- a/pym/portage/_sets/files.py +++ b/pym/portage/_sets/files.py @@ -1,4 +1,4 @@ -# Copyright 2007 Gentoo Foundation +# Copyright 2007-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import errno @@ -209,7 +209,7 @@ class WorldSelectedSet(EditablePackageSet): description = "Set of packages that were directly installed by the user" def __init__(self, eroot): - super(WorldSelectedSet, self).__init__() + super(WorldSelectedSet, self).__init__(allow_repo=True) # most attributes exist twice as atoms and non-atoms are stored in # separate files self._lock = None @@ -222,7 +222,7 @@ class WorldSelectedSet(EditablePackageSet): self._mtime2 = None def _validate(self, atom): - return ValidAtomValidator(atom) + return ValidAtomValidator(atom, allow_repo=True) def _validate2(self, setname): return setname.startswith(SETPREFIX) |