On my amd64 machine I see the following traceback from portage. Indeed looking at the code in question the offending variable is undefined. This seems to be a trivial bug. ``` Traceback (most recent call last): File "/usr/lib/python-exec/python3.11/emerge", line 59, in <module> retval = emerge_main() ^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/main.py", line 1306, in emerge_main return run_action(emerge_config) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 4020, in run_action retval = action_build(emerge_config, spinner=spinner) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 677, in action_build retval = mergetask.merge() ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/_emerge/Scheduler.py", line 1263, in merge color = "PKG_BINARY_MERGE" if pkg.built else "INFORM" ^^^ NameError: name 'pkg' is not defined ``` Reproducible: Always Steps to Reproduce: 1. Try to merge something that fails (which triggers the faulty output path).
Please include emerge --info.
Created attachment 872521 [details] emerge --info
It was this change from bug 914159, and it looks like we might have to search through self._failed_pkgs_all to match the key variable to a package cpv. https://gitweb.gentoo.org/proj/portage.git/commit/?id=f5081b7def54bc9e49aac117ce2b1ebc89379c79
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=935d1432b2ea42fc0a49b9e3368a1766a673e1a9 commit 935d1432b2ea42fc0a49b9e3368a1766a673e1a9 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2023-10-21 01:31:44 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2023-10-22 04:36:43 +0000 _emerge: Fix NameError 'pkg' bug 915551 Use (pkg.cpv, pkg.root) to lookup package instances corresponding to die messages. Bug: https://bugs.gentoo.org/915551 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/_emerge/Scheduler.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b9128b401def05cac46f9e6d66048e5a0d888b8 commit 2b9128b401def05cac46f9e6d66048e5a0d888b8 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-10-25 05:48:31 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-10-25 05:48:40 +0000 sys-apps/portage: add 3.0.54 Closes: https://bugs.gentoo.org/905869 Closes: https://bugs.gentoo.org/915551 Closes: https://bugs.gentoo.org/915896 Closes: https://bugs.gentoo.org/916106 Closes: https://bugs.gentoo.org/916108 Closes: https://bugs.gentoo.org/916112 Closes: https://bugs.gentoo.org/916116 Closes: https://bugs.gentoo.org/916139 Closes: https://bugs.gentoo.org/916141 Closes: https://bugs.gentoo.org/916142 Closes: https://bugs.gentoo.org/916149 Closes: https://bugs.gentoo.org/916182 Closes: https://bugs.gentoo.org/916231 Closes: https://bugs.gentoo.org/916235 Closes: https://bugs.gentoo.org/916240 Closes: https://bugs.gentoo.org/916242 Closes: https://bugs.gentoo.org/916245 Closes: https://bugs.gentoo.org/916248 Closes: https://bugs.gentoo.org/899898 Closes: https://bugs.gentoo.org/906129 Closes: https://bugs.gentoo.org/906156 Closes: https://bugs.gentoo.org/916031 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.54.ebuild | 238 +++++++++++++++++++++++++++++++++ 2 files changed, 239 insertions(+)
*** Bug 916335 has been marked as a duplicate of this bug. ***