Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 610852

Summary: sys-apps/portage-2.3.3: SyncRepos._match_repos should support repo alias
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Interface (emerge)Assignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: esigra
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 240187, 611328    

Comment 1 Alexandru Elisei 2017-02-27 14:26:53 UTC
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.
Comment 2 Zac Medico gentoo-dev 2017-02-27 15:55:34 UTC
(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.
Comment 5 Zac Medico gentoo-dev 2017-05-20 18:19:17 UTC
Fixed in portage-2.3.5.