Summary: | portage doesn't update mtimedb["ldpath"] leading to excessive ldconfig runs | ||
---|---|---|---|
Product: | Portage Development | Reporter: | SpanKY <vapier> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sam |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/portage/pull/821 https://bugs.gentoo.org/show_bug.cgi?id=161490 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 837899 | ||
Bug Blocks: | 835380 | ||
Attachments: | emerge --info |
Description
SpanKY
2022-03-29 15:59:23 UTC
A bisect would be helpful. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=964c0e16172b76a8ebdd737cd8919870ae2b5f96 commit 964c0e16172b76a8ebdd737cd8919870ae2b5f96 Author: Mike Frysinger <vapier@chromium.org> AuthorDate: 2022-03-29 13:56:55 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-13 15:34:30 +0000 vartree: skip env-update if no updates were merged This speeds up virtual/ installs by not constantly re-running env-update. [sam: cherry-picked from chromiumos' third_party/portage_tool repo] (cherry picked from commit 87ac3566ebb7155a57876d345849bd0fd6878c0e) Bug: https://bugs.gentoo.org/836375 Signed-off-by: Sam James <sam@gentoo.org> lib/portage/dbapi/vartree.py | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) The reason that mtimedb["ldpath"] doesn't update is that the env_update call occurs in a subprocess via the MergeProcess class. So, changes to the prev_mtimes dictionary which occur in the subprocess do not propagate back to the mtimedb in the parent process. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=e893f4fc12eb618318b1945ce7a05a94fb1ea1b4 commit e893f4fc12eb618318b1945ce7a05a94fb1ea1b4 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2022-04-17 19:12:40 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2022-04-18 02:18:31 +0000 MergeProcess: propagate mtimedb["ldpath"] to parent process (bug 836375) Use an instance of multiprocessing.Pipe to propagate mtimedb["ldpath"] from the MergeProcess child process to the parent process. This fixes env_update calls to avoid unnecessary regeneration of ld.so.cache in cases where mtimedb["ldpath"] has not changed since the last call to env_update. Bug: https://bugs.gentoo.org/836375 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/dbapi/_MergeProcess.py | 22 ++++++++++++++++++++++ lib/portage/dbapi/vartree.py | 10 ++++++++++ 2 files changed, 32 insertions(+) |