Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 749333 - sys-apps/portage: repository alias triggers "repos.conf has name different from repository name" message during pkg_preinst
Summary: sys-apps/portage: repository alias triggers "repos.conf has name different fr...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Lowest trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 766117
Blocks:
  Show dependency tree
 
Reported: 2020-10-15 18:13 UTC by Zac Medico
Modified: 2021-03-31 20:52 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 Zac Medico gentoo-dev 2020-10-15 18:13:59 UTC
For example, if I have this in /etc/portage/repos.conf:

[gentoo]
aliases = funtoo

Then I see this message emitted from this command:

env -u DISTDIR -u PORTAGE_OVERRIDE_EPREFIX -u PORTAGE_REPOSITORIES -u PORTDIR -u PORTDIR_OVERLAY PYTHONPATH=/var/tmp/portage/sys-apps/portage-3.0.8/image/usr/lib/python3.9/site-packages /usr/bin/python3.9 -m portage._compat_upgrade.default_locations
!!! Section 'funtoo' in repos.conf has name different from repository name 'gentoo' set inside repository

However, it does not emit this message if I run the same command outside of the ebuild environment.
Comment 1 Zac Medico gentoo-dev 2020-10-15 18:15:22 UTC
The message is actually emitted from this command:

env -u BINPKG_COMPRESS PYTHONPATH=/var/tmp/portage/sys-apps/portage-3.0.8/image/usr/lib/python3.9/site-packages /usr/bin/python3.9 -m portage._compat_upgrade.binpkg_compression
Comment 2 Zac Medico gentoo-dev 2021-02-27 00:58:57 UTC
The PORTAGE_REPOSITORIES environment variable triggers this. Apparently the generated PORTAGE_REPOSITORIES output replaces real repo names with aliases. So, that needs to be fixed, and also the ebuild should do env -u PORTAGE_REPOSITORIES here anyway.
Comment 3 Larry the Git Cow gentoo-dev 2021-02-27 01:13:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09caf4abe3e58ea120f5db4bc06e04dde971734c

commit 09caf4abe3e58ea120f5db4bc06e04dde971734c
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-02-27 01:11:30 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-02-27 01:12:50 +0000

    sys-apps/portage: env -u PORTAGE_REPOSITORIES (bug 749333)
    
    Bug: https://bugs.gentoo.org/749333
    Package-Manager: Portage-3.0.15, Repoman-3.0.2
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 sys-apps/portage/portage-3.0.12.ebuild    | 2 +-
 sys-apps/portage/portage-3.0.13.ebuild    | 2 +-
 sys-apps/portage/portage-3.0.14.ebuild    | 2 +-
 sys-apps/portage/portage-3.0.15-r2.ebuild | 2 +-
 sys-apps/portage/portage-9999.ebuild      | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2021-02-27 01:28:50 UTC
The bug has been referenced in the following commit(s):

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

commit 396b1ea5a7a0f868abe6b0b08352243f8fd48f35
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2021-02-27 01:26:06 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2021-02-27 01:27:07 +0000

    RepoConfig.config_string: don't override repos with aliases (bug 749333)
    
    Bug: https://bugs.gentoo.org/749333
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/repository/config.py | 2 ++
 1 file changed, 2 insertions(+)