summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dep/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index 89b6f1547..5bb6becdb 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -1216,6 +1216,18 @@ class Atom(_atom_base):
return Atom(self.replace(_slot_separator + self.slot, '', 1),
allow_repo=True, allow_wildcard=True)
+ def with_repo(self, repo):
+ if self.slot is None:
+ atom = self
+ else:
+ atom = remove_slot(self)
+ if self.slot is not None:
+ atom += _slot_separator + slot
+ atom += _repo_separator + repo
+ if self.use is not None:
+ atom += str(self.use)
+ return Atom(atom, allow_repo=True, allow_wildcard=True)
+
def with_slot(self, slot):
atom = remove_slot(self) + _slot_separator + slot
if self.repo is not None: