There are two issues with ekeyword in Prefix: 1) $ ekeyword x86-linux ... Traceback (most recent call last): File "/gentoo/prefix/32bit/usr/lib/python-exec/python3.6/ekeyword", line 41, in <module> ekeyword.main(sys.argv[1:]) File "/gentoo/prefix/32bit/usr/lib/python3.6/site-packages/gentoolkit/ekeyword/ekeyword.py", line 527, in main if not portage_settings().get('NOCOLOR', 'false').lower() in ('no', 'false'): File "/gentoo/prefix/32bit/usr/lib/python3.6/site-packages/gentoolkit/ekeyword/ekeyword.py", line 346, in portage_settings return portage.db['/']['vartree'].settings File "/gentoo/prefix/32bit/usr/lib/python3.6/site-packages/portage/proxy/objectproxy.py", line 44, in __getitem__ return object.__getattribute__(self, '_get_target')()[key] KeyError: '/' Here, using portage.root instead of '/' does help. 2) I do maintain a stable fork of Prefix, where the main-repo is not called "gentoo": $ ekeyword x86-linux ... Traceback (most recent call last): File "/gentoo/prefix/32bit/usr/lib/python-exec/python3.6/ekeyword", line 41, in <module> ekeyword.main(sys.argv[1:]) File "/gentoo/prefix/32bit/usr/lib/python3.6/site-packages/gentoolkit/ekeyword/ekeyword.py", line 533, in main arch_status = load_profile_data() File "/gentoo/prefix/32bit/usr/lib/python3.6/site-packages/gentoolkit/ekeyword/ekeyword.py", line 361, in load_profile_data portdir = portage_settings().repositories[repo].location File "/gentoo/prefix/32bit/usr/lib/python3.6/site-packages/portage/repository/config.py", line 1021, in __getitem__ return self.prepos[repo_name] KeyError: 'gentoo' Here, using portage_settings().repositories.mainRepo().name instead of 'gentoo' does help.
Created attachment 593612 [details, diff] proposed patch Thoughts? Is it worth to have two distinct commits?
(In reply to Michael Haubenwallner from comment #1) > Created attachment 593612 [details, diff] [details, diff] > proposed patch > > Thoughts? Is it worth to have two distinct commits? Looks good. Yeah two commits will be nicer.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=8d941d9c0e77eaab787df5f19ab97ca8a2fd6cff commit 8d941d9c0e77eaab787df5f19ab97ca8a2fd6cff Author: Michael Haubenwallner <haubi@gentoo.org> AuthorDate: 2019-10-24 15:05:35 +0000 Commit: Michael Haubenwallner <haubi@gentoo.org> CommitDate: 2019-10-24 15:05:56 +0000 ekeyword: fix for when main-repo != "gentoo" Closes: https://bugs.gentoo.org/698256 Signed-off-by: Michael Haubenwallner <haubi@gentoo.org> pym/gentoolkit/ekeyword/ekeyword.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=f2278785d6833e3e3358cd847280e9c9107f303e commit f2278785d6833e3e3358cd847280e9c9107f303e Author: Michael Haubenwallner <haubi@gentoo.org> AuthorDate: 2019-10-24 15:05:15 +0000 Commit: Michael Haubenwallner <haubi@gentoo.org> CommitDate: 2019-10-24 15:05:15 +0000 ekeyword: fix for Prefix Bug: https://bugs.gentoo.org/698256 Signed-off-by: Michael Haubenwallner <haubi@gentoo.org> pym/gentoolkit/ekeyword/ekeyword.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)