Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703958 - app-eselect/eselect-repository - eselect repository add should cross-check repo_name from repo uri
Summary: app-eselect/eselect-repository - eselect repository add should cross-check re...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-27 11:33 UTC by charles17
Modified: 2019-12-27 17:44 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 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.