Created attachment 768151 [details] emerge --info not sure when this started. i'm seeing it with 3.0.21 & 3.0.28 & 3.0.30 for sure. it's easy to reproduce with pax-utils which shouldn't really be causing cache rebuilds since it doesn't install any lib files that ldconfig would touch. # touch /lib64 # emerge -bOv pax-utils |& grep ld.so.cache >>> Regenerating /etc/ld.so.cache... # emerge -KOv pax-utils |& grep ld.so.cache >>> Regenerating /etc/ld.so.cache... # emerge -KOv pax-utils |& grep ld.so.cache >>> Regenerating /etc/ld.so.cache...
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(+)