Summary: | Crash when creating binpkg (KeyError: 'bintree') with FEATURES="downgrade-backup" | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Sam James <sam> |
Component: | Binary packages support | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | zmedico |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=916106 https://github.com/gentoo/portage/pull/1336 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 930802 | ||
Bug Blocks: | |||
Attachments: | build.log |
Description
Sam James
2024-06-01 04:35:16 UTC
Hit this after running 'cp antlr4-python3-runtime-{4.13.1,4.9.3.ebuild}' in dev-python/antlr-python3-runtime at commit 3f63c5bd7c8fd39ff70ca518db4f4d6bdce625f6. I doubt it's relevant but I say it for completeness given nothing comes to mind for what would've changed recently for this? Another merge is running, by the way, but it's currently mid-GCC build. Inside lib/portage/dbapi/_MergeProcess.py we need to add bintree here: # Since the entire QueryCommand._db is not required, only pass # in tree types that QueryCommand specifically requires. child_db = {} parent_db = portage.db if QueryCommand._db is None else QueryCommand._db for root in parent_db: child_db[root] = {} for tree_type in ("vartree", "porttree"): child_db[root][tree_type] = parent_db[root][tree_type] The flaw was in this commit: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b9a85ff987ea677e350fb70e2c3355197ee6c39b commit b9a85ff987ea677e350fb70e2c3355197ee6c39b Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2023-10-22 08:08:02 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2023-10-22 21:29:49 +0000 MergeProcess: Support QueryCommand with spawn start method Since QueryCommand._db does not propagate to the child process in MergeProcess with the multiprocessing spawn start method, handle it by passing QueryCommand._db as an explicit parameter. Since self.mydbapi can be a bindbapi instance, override the bindbapi __getstate__ method so that it is picklable (omit the unpicklable _aux_cache_slot_dict attribute and regenerate it after unpickling). Bug: https://bugs.gentoo.org/916106 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/dbapi/_MergeProcess.py | 19 ++++++++++++++++--- lib/portage/dbapi/bintree.py | 20 ++++++++++++++++++-- 2 files changed, 34 insertions(+), 5 deletions(-) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=1a7fc63d20ad2e1292be3697c105c2d7e1691f91 commit 1a7fc63d20ad2e1292be3697c105c2d7e1691f91 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-06-01 04:56:45 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-06-01 19:18:35 +0000 MergeProcess: Pass bintree to subprocess It's required for FEATURES=*-backup. Fixes: b9a85ff987ea ("MergeProcess: Support QueryCommand with spawn start method") Bug: https://bugs.gentoo.org/933297 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/dbapi/_MergeProcess.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dd08f05355b14c7594d0e0ccf46cdb2b1486cbe commit 1dd08f05355b14c7594d0e0ccf46cdb2b1486cbe Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-04 01:31:07 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-04 01:31:07 +0000 sys-apps/portage: add 3.0.65 Closes: https://bugs.gentoo.org/930802 Closes: https://bugs.gentoo.org/787623 Closes: https://bugs.gentoo.org/922629 Closes: https://bugs.gentoo.org/927241 Closes: https://bugs.gentoo.org/930992 Closes: https://bugs.gentoo.org/932739 Closes: https://bugs.gentoo.org/932804 Closes: https://bugs.gentoo.org/933297 Closes: https://bugs.gentoo.org/933385 Closes: https://bugs.gentoo.org/933442 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.65.ebuild | 242 +++++++++++++++++++++++++++++++++ 2 files changed, 243 insertions(+) |