Summary: | sys-apps/portage: emerge --getbinpkg --keep-going chooses different BUILD_ID on resume | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Zac Medico <zmedico> |
Component: | Binary packages support | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra, sam, zmedico |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/portage/pull/1339 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 930802 | ||
Bug Blocks: | 373807 | ||
Attachments: | emerge output showing the original merge list and merge list after --keep-going |
Description
Zac Medico
![]() Created attachment 894969 [details]
emerge output showing the original merge list and merge list after --keep-going
The selected BUILD_ID is not saved in the mtimedb resume list, and this code in the depgraph _loadResumeCommand method makes poor package selection choices: pkg = None for pkg in self._iter_match_pkgs(root_config, pkg_type, atom): if not self._pkg_visibility_check( pkg ) or self._frozen_config.excluded_pkgs.findAtomForPackage( pkg, modified_use=self._pkg_use_enabled(pkg) ): continue break In order to extend the resume mergelist format while keeping this schema backward compatibly, I think we should add an additional key next to the mergelist, and use it to store the build it, build time, file size, and mtime of selected binary packages. Older versions of portage can simply ignore the added key. That was the first thing on my list to check - I had a feeling we didn't save it at all... The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=3a9f2c09eb75f47cf3ae15fa4ebe671548a66870 commit 3a9f2c09eb75f47cf3ae15fa4ebe671548a66870 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-06-03 01:18:44 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-06-03 01:55:08 +0000 Add binpkgs info to mtimedb resume data In order to fix emerge --resume and --keep-going to make appropriate binary package selections, store a list of binpkgs in the resume data. By adding the data as a new key which older versions of portage will ignore, the extension is backward compatible. Without this fix, emerge --resume and --keep-going make poor package selection choices which do not account for the --binpkg-respect-use option. Bug: https://bugs.gentoo.org/933442 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/_emerge/Scheduler.py | 13 +++++++++++++ lib/_emerge/actions.py | 7 +++++++ lib/_emerge/depgraph.py | 21 +++++++++++++++++++++ lib/portage/tests/util/test_mtimedb.py | 30 +++++++++++++++++++++++++----- 4 files changed, 66 insertions(+), 5 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(+) |