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

Bug 703958

Summary: app-eselect/eselect-repository - eselect repository add should cross-check repo_name from repo uri
Product: Gentoo Linux Reporter: charles17
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description charles17 2019-12-27 11:33:40 UTC
Using "eselect repository add <repo_name> git <repo_uri>" should cross-check the <repo_name> with the repositories repo_name.


su -c "eselect repository add foobar git https://github.com/pchome/proton-gentoo-overlay"
Password: 
Adding foobar to /etc/portage/repos.conf ...
Repository foobar added



 su -c "emaint sync -r foobar"
Password: 
>>> Syncing repository 'foobar' into '/var/db/repos/foobar'...
/usr/bin/git clone --depth 1 https://github.com/pchome/proton-gentoo-overlay .
Cloning into '.'...
remote: Enumerating objects: 104, done.
remote: Counting objects: 100% (104/104), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 104 (delta 30), reused 82 (delta 19), pack-reused 0
Receiving objects: 100% (104/104), 39.69 KiB | 423.00 KiB/s, done.
Resolving deltas: 100% (30/30), done.
=== Sync completed for foobar
!!! Section 'foobar' in repos.conf has name different from repository name 'proton' set inside repository

Action: sync for repo: foobar, returned code = 0
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-27 17:44:23 UTC
I'm sorry but eselect-repo is supposed to contain no VCS support of its own.  Instead, it relies entirely on the package manager to do the syncing.  It can't do what you're asking for without violating this principle.

I can add a 'rename' option if you'd find that helpful.  However, it's also trivially doable via editing repos.conf, so I'm not sure if there's a point.