Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610852 - sys-apps/portage-2.3.3: SyncRepos._match_repos should support repo alias
Summary: sys-apps/portage-2.3.3: SyncRepos._match_repos should support repo alias
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 240187 611328
  Show dependency tree
 
Reported: 2017-02-25 00:53 UTC by Zac Medico
Modified: 2017-05-20 18:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.