Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935830 - Repositories cannot be configured using an alias
Summary: Repositories cannot be configured using an alias
Status: IN_PROGRESS
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords: InVCS
Depends on: 933499
Blocks:
  Show dependency tree
 
Reported: 2024-07-10 16:48 UTC by James Le Cuirot
Modified: 2024-08-30 22:50 UTC (History)
0 users

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.
Description James Le Cuirot gentoo-dev 2024-07-10 16:48:06 UTC
Although aliases can be assigned to repositories, either by the user or by repositories themselves, these cannot be used as the [name] in repos.conf. This is inconvenient if a repository wants to change its name without breaking existing configurations.

I have already fixed this, I'm just filing this bug for posterity.
Comment 1 Larry the Git Cow gentoo-dev 2024-07-10 16:55:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=ea04a583fab9739dbe05e8d8381ed2803e7dce88

commit ea04a583fab9739dbe05e8d8381ed2803e7dce88
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2024-07-09 13:07:58 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2024-07-10 16:55:20 +0000

    config: Allow a repository to be configured using one of its aliases
    
    Currently, the `[name]` in repos.conf can only match the primary name.
    This is inconvenient if a repository wants to change its name without
    breaking existing configurations.
    
    This raises the question of whether to then use the primary name or the
    alias in the UI and in the vardb. I went with the primary name because
    this is presumably the name that the repository actually wants you to
    use.
    
    If the configured name matches neither the primary name nor an alias,
    then emaint sync will simply claim that it is not found, but that
    behaviour is unchanged from before.
    
    Bug: https://bugs.gentoo.org/935830
    Closes: https://github.com/gentoo/portage/pull/1358
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 NEWS                             |  3 +++
 lib/portage/repository/config.py | 10 ++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)