From 05eac1c00d668fd8f36e8dabc656eaa3cdeabdcf Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 18 Mar 2013 23:37:52 -0700 Subject: [PATCH] append_repo: preserve existing repo atom This will fix bug #461948. --- pym/portage/util/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 1736ad648..5c5e1138e 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -250,12 +250,13 @@ def stack_dicts(dicts, incremental=0, incrementals=[], ignore_none=0): def append_repo(atom_list, repo_name, remember_source_file=False): """ Takes a list of valid atoms without repo spec and appends ::repo_name. + If an atom already has a repo part, then it is preserved (see bug #461948). """ if remember_source_file: - return [(Atom(atom + "::" + repo_name, allow_wildcard=True, allow_repo=True), source) \ + return [(atom.repo is not None and atom or Atom(atom + "::" + repo_name, allow_wildcard=True, allow_repo=True), source) \ for atom, source in atom_list] else: - return [Atom(atom + "::" + repo_name, allow_wildcard=True, allow_repo=True) \ + return [atom.repo is not None and atom or Atom(atom + "::" + repo_name, allow_wildcard=True, allow_repo=True) \ for atom in atom_list] def stack_lists(lists, incremental=1, remember_source_file=False, -- 2.26.2