Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925350 - Get KeyError: ''EAPI' during portage dependency calculation (suppressed by --dynamic-deps=n)
Summary: Get KeyError: ''EAPI' during portage dependency calculation (suppressed by --...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: AMD64 Linux
: Normal critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 925518 (view as bug list)
Depends on: 925214
Blocks:
  Show dependency tree
 
Reported: 2024-02-24 06:46 UTC by arjones239
Modified: 2024-02-25 22:39 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
error message and output of emerge --info (error_and_emerge_info.txt,9.52 KB, text/plain)
2024-02-24 06:46 UTC, arjones239
Details

Note You need to log in before you can comment on or make changes to this bug.
Description arjones239 2024-02-24 06:46:09 UTC
Created attachment 885825 [details]
error message and output of emerge --info

Any emerge command that triggers a calculation of dependencies (install, update, depclean, etc.) throws the attached error. I've attached the output of emerge --info too in the same file.

I downloaded a new version of portage as per the wiki page on how to fix a broken portage, but it did not fix the issue. I believe this issue was triggered by an updated ebuild, since I had updated my system without issue. Later, I ran eix-sync and am now seeing the error.
Comment 1 Zac Medico gentoo-dev 2024-02-24 13:19:48 UTC
I have --dynamic-deps=n in my EMERGE_DEFAULT_OPTS but I can trigger this if I use --dynamic-deps=y.
Comment 2 Zac Medico gentoo-dev 2024-02-24 13:27:16 UTC
There was a flaw in this commit:

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

commit f9ea958018c02b3ce07761c2d965260498add2af
Author: Zac Medico <zmedico@gentoo.org>
Date:   2024-02-12 20:04:34 -0800

    MetadataRegen: Use EbuildMetadataPhase deallocate_config
    
    For EbuildMetadataPhase consumers like MetadataRegen and
    depgraph, store a pool of config instances in a config_pool
    list, and return instaces to the list when the deallocate_config
    future is done.
    
    Bug: https://bugs.gentoo.org/924319
    Fixes: c95fc64abf96 ("EbuildPhase: async_check_locale")
    Signed-off-by: Zac Medico <zmedico@gentoo.org>


Here is the fix:

--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -785,3 +785,3 @@ class depgraph:
                     repo_path=repo_path,
-                    settings=portdb.doebuild_settings,
+                    settings=settings,
                     deallocate_config=deallocate_config,
Comment 3 Zac Medico gentoo-dev 2024-02-24 13:37:15 UTC
(In reply to Zac Medico from comment #2)
> --- a/lib/_emerge/depgraph.py
> +++ b/lib/_emerge/depgraph.py
> @@ -785,3 +785,3 @@ class depgraph:
>                      repo_path=repo_path,
> -                    settings=portdb.doebuild_settings,
> +                    settings=settings,
>                      deallocate_config=deallocate_config,

I've included this fix in https://github.com/gentoo/portage/pull/1278 which fixes other breakage related to changes from bug 923841.
Comment 4 Larry the Git Cow gentoo-dev 2024-02-24 20:03:05 UTC
The bug has been referenced in the following commit(s):

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

commit d06515e1424be60c8ed7af6ed2a80d56145b85c5
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-02-24 13:28:22 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-02-24 13:39:29 +0000

    _dynamic_deps_preload: Fix settings reference
    
    Use the settings reference from the config pool as
    intended to prevent a KeyError similar to bug 924319
    but triggered by emerge --dynamic-deps.
    
    Fixes: f9ea958018c0 ("MetadataRegen: Use EbuildMetadataPhase deallocate_config")
    Bug: https://bugs.gentoo.org/925350
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/depgraph.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Larry the Git Cow gentoo-dev 2024-02-25 08:32:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ad9d3103abc02f60d9e123ae21fa4a2e69b7e38

commit 6ad9d3103abc02f60d9e123ae21fa4a2e69b7e38
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-25 08:32:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-25 08:32:47 +0000

    sys-apps/portage: add 3.0.63
    
    Closes: https://bugs.gentoo.org/925214
    Closes: https://bugs.gentoo.org/651018
    Closes: https://bugs.gentoo.org/922935
    Closes: https://bugs.gentoo.org/925240
    Closes: https://bugs.gentoo.org/925311
    Closes: https://bugs.gentoo.org/925333
    Closes: https://bugs.gentoo.org/925350
    Closes: https://bugs.gentoo.org/925456
    Closes: https://bugs.gentoo.org/925460
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.63.ebuild | 246 +++++++++++++++++++++++++++++++++
 2 files changed, 247 insertions(+)
Comment 6 arjones239 2024-02-25 21:36:26 UTC
Should this be resolved on my end then? I'm still seeing the same thing after another eix-sync. I'm using git to sync my portage repo.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-25 21:43:26 UTC
(In reply to arjones239 from comment #6)
> Should this be resolved on my end then? I'm still seeing the same thing
> after another eix-sync. I'm using git to sync my portage repo.

You will have to upgrade Portage first. Try: emerge --sync --ignore-default-opts && emerge -v1 --ignore-default-opts sys-apps/portage.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-25 22:13:59 UTC
*** Bug 925518 has been marked as a duplicate of this bug. ***
Comment 9 arjones239 2024-02-25 22:39:08 UTC
Thanks. That fixed it.