If repo_name != name in repos.conf portage tools behave inconsistently: portageq get_repo_path / <name> uses name in repos.conf package.mask uses name in repo_name "portageq repositories_configuration / sometimes complain: !!! Section 'tm-cusfpv3' in repos.conf has name different from repository name 'gentoo' set inside repository What makes most sense to me is to always use name in repos.conf and ignore repo_name
If name of section in repos.conf is different from name set inside repository, then that repository is simply not used at all. pym/portage/repository/config.py: if repo.name != repo_name: writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf has name different " "from repository name '%s' set inside repository") % (repo_name, repo.name), level=logging.ERROR, noiselevel=-1) >>> del prepos[repo_name] continue
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #1) > If name of section in repos.conf is different from name set inside > repository, then that repository is simply not used at all. > > pym/portage/repository/config.py: > if repo.name != repo_name: > writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf has name > different " > "from repository name '%s' set inside repository") % > (repo_name, repo.name), level=logging.ERROR, noiselevel=-1) > >>> del prepos[repo_name] > continue If this is so, what is the purpose of name in repos.conf? Seems pointless to me to just repeat the name one more.
It's useful for the values to correspond, as a sanity check. However, we could add a repos.conf setting to override it.
(In reply to Joakim Tjernlund from comment #2) if you use portage, you can specify the name *only* in repos.conf and not bother creating the repo_name file. this makes managing repos easier for people as all the relevant content lives in a single place.
(In reply to SpanKY from comment #4) > (In reply to Joakim Tjernlund from comment #2) > > if you use portage, you can specify the name *only* in repos.conf and not > bother creating the repo_name file. this makes managing repos easier for > people as all the relevant content lives in a single place. If there is no ${repository_location}/profiles/repo_name and no repo-name attribute in ${repository_location}/metadata/layout.conf, then emerge (but not other tools like portageq) prints a warning: WARNING: One or more repositories have missing repo_name entries: .../profiles/repo_name NOTE: Each repo_name entry should be a plain text file containing a unique name for the repository on the first line.
(In reply to Zac Medico from comment #3) > It's useful for the values to correspond, as a sanity check. However, we > could add a repos.conf setting to override it. I can not see how that would be a sanity check. Insisting on these 2 names to be the same just makes the name in repos.conf pointless. If you still want to keep some sort of sanity check, please that as a NEW option to portage.
(In reply to SpanKY from comment #4) > (In reply to Joakim Tjernlund from comment #2) > > if you use portage, you can specify the name *only* in repos.conf and not > bother creating the repo_name file. this makes managing repos easier for > people as all the relevant content lives in a single place. Yes, I have noticed that too and is using that as an workaround for the repos I control. It is not without side effects as noted in comment #5 Still, this is not a solution, just a tmp fix to get through the day. The repo_name only makes sense in a PORTDIR setting and this is obsolete.
Can we move this on? It is getting difficult. [gentoo] location = /usr/portage sync-type = rsync sync-uri = rsync://rsync.de.gentoo.org/gentoo-portage auto-sync = yes [gentoo2] location = /usr/portage-git sync-type = git sync-uri = https://github.com/gentoo-mirror/gentoo.git auto-sync = yes emaint sync -r gentoo2 * Emaint sync, The specified repos were not found: gentoo2 ...returning emaint sync -a ... !!! Section 'gentoo2' in repos.conf has name different from repository name 'gentoo' set inside repository BTW, try this: [gentoo] location = /usr/portage-git sync-type = git sync-uri = https://github.com/gentoo-mirror/gentoo.git auto-sync = yes above still wants to clone into /usr/portage for me
I think about implementing an attribute, which causes ignoring of internal (i.e. set inside repository) repository name and using of section name as repository name. Maybe 'ignore-internal-repo-name = true'?
Or 'force-user-repo-name = true'?
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #9) > I think about implementing an attribute, which causes ignoring of internal > (i.e. set inside repository) repository name and using of section name as > repository name. > Maybe 'ignore-internal-repo-name = true'? yes, but why not just make this default? What is the use of repo_name now? I still think the default behaviour should be to use the name in repos.conf and ignore the old one. if you really want strict matching you could impl. an option to enable that, I still would like to know what the use case is though.
(In reply to Joakim Tjernlund from comment #11) > yes, but why not just make this default? Ignoring profiles/repo_name by default could be PMS-incompatible. So it is better to do it only when forced by user.
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #12) > (In reply to Joakim Tjernlund from comment #11) > > yes, but why not just make this default? > > Ignoring profiles/repo_name by default could be PMS-incompatible. So it is > better to do it only when forced by user. Could you find out? Seems like none thinks current behaviour is good and the only reason keep it is fear of breaking something. I think adding a new option should be a last resort if all else fails. In any case the behaviour needs to be better specified as there are other tools than portage and ATM they do not behave consistent.
ping