This code should support repo aliases: https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/emaint/modules/sync/sync.py?h=portage-2.3.3#n146
What happens if the repo is specified multiple times? Like this: # emerge --sync gentoo gentoo Right now emerge throws a cryptic error: The specified repos were not found: ... returning which is the wrong error. There's only one repo (with the name gentoo), and the list of repos will have one less repo than match_repos, and emerge will think that a repo wasn't found: https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/emaint/modules/sync/sync.py#n158 The same situation can happen if a repo has multiple aliases and we give more than one of them as arguments to sync. I am thinking we should simply deal with this situation instead of throwing an error.
(In reply to Alexandru Elisei from comment #1) > I am thinking we should simply deal with this situation instead of throwing > an error. Yeah, let's discard duplicates. For each repo, add the un-aliased name to set, then ignore any remaining arguments that have the same un-aliased name.
This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9d14e63a814cab949ac49eb4d780b5545954da57
Updated emerge man page: https://gitweb.gentoo.org/proj/portage.git/commit/?id=92069c976b67412791bb4fe3b007244a05d11a6d
Fixed in portage-2.3.5.