commit: 2528c3f25ce3edaf9f5a1a69bf4a1365e0c28d7a Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Fri Oct 31 05:08:57 2025 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Fri Oct 31 05:33:34 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2528c3f2
ManifestTask: set returncode to that of failed gpg process In order for ManifestScheduler retry to detect an unexpected returncode, ManifestTask must expose the failed gpg process returncode as the ManifestTask returncode. Fixes: 448b7748adb4494b8a7dbfb5293437c1100c8977 Bug: https://bugs.gentoo.org/965132 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py b/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py index 36b2a642cd..5349c1fcc9 100644 --- a/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py +++ b/lib/portage/package/ebuild/_parallel_manifest/ManifestTask.py @@ -1,4 +1,4 @@ -# Copyright 2012-2018 Gentoo Foundation +# Copyright 2012-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 import errno @@ -73,6 +73,8 @@ class ManifestTask(CompositeTask): def _manifest_proc_exit(self, manifest_proc): self._assert_current(manifest_proc) if manifest_proc.returncode not in (os.EX_OK, manifest_proc.MODIFIED): + # Expose the process returncode so that manifest_scheduler_retry + # can detect an unexpected process returncode (bug 965132). self.returncode = manifest_proc.returncode self._current_task = None self.wait() @@ -205,6 +207,9 @@ class ManifestTask(CompositeTask): def _gpg_proc_exit(self, gpg_proc): if self._default_exit(gpg_proc) != os.EX_OK: + # Expose the process returncode so that manifest_scheduler_retry + # can detect an unexpected process returncode (bug 965132). + self.returncode = gpg_proc.returncode self.wait() return
