From: Zac Medico Date: Tue, 19 Mar 2013 06:37:52 +0000 (-0700) Subject: append_repo: preserve existing repo atom X-Git-Tag: v2.2.0_alpha167~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=05eac1c00d668fd8f36e8dabc656eaa3cdeabdcf;p=portage.git append_repo: preserve existing repo atom This will fix bug #461948. --- 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,