The cached portage.getpid() function avoids unnecessary syscalls: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6b08846736ebf8a224f8aad2a5b17baf66fec1e0
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/e43c7c7fb6b294eb52b57c94463af138 https://github.com/gentoo/portage/pull/610
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=cf07a23a0ff77049476e0f4b94afbb6a844806fa commit cf07a23a0ff77049476e0f4b94afbb6a844806fa Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-08-29 20:13:44 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-08-31 06:25:05 +0000 Use cached portage.getpid() function (bug 739540) Use the cached portage.getpid() function to avoid unnecessary syscalls, and update the cache after each call to os.fork() where the fork may invoke portage APIs. Bug: https://bugs.gentoo.org/739540 Signed-off-by: Zac Medico <zmedico@gentoo.org> bin/quickpkg | 2 +- lib/_emerge/EbuildBinpkg.py | 4 +++- lib/_emerge/actions.py | 2 +- lib/portage/_emirrordist/FetchTask.py | 4 ++-- lib/portage/cache/metadata.py | 4 +++- lib/portage/elog/mod_mail_summary.py | 5 ++--- lib/portage/elog/mod_save_summary.py | 2 +- lib/portage/locks.py | 2 +- lib/portage/package/ebuild/doebuild.py | 2 +- lib/portage/process.py | 16 +++++++++++----- lib/portage/tests/locks/test_lock_nonblock.py | 1 + .../tests/util/futures/asyncio/test_wakeup_fd_sigchld.py | 2 +- lib/portage/util/__init__.py | 4 ++-- lib/portage/util/_eventloop/EventLoop.py | 6 +++--- lib/portage/util/_eventloop/asyncio_event_loop.py | 4 ++-- lib/portage/util/_eventloop/global_event_loop.py | 7 +++---- lib/portage/util/locale.py | 1 + lib/portage/util/movefile.py | 2 +- lib/portage/util/socks5.py | 2 +- lib/portage/xpak.py | 2 +- 20 files changed, 42 insertions(+), 32 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abdafd44b842135d6a06cf243720f878277ccbe2 commit abdafd44b842135d6a06cf243720f878277ccbe2 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2020-08-31 06:54:49 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2020-08-31 07:08:07 +0000 sys-apps/portage: Bump to version 3.0.5 #439688 depgraph: Allow elimination of highest version after slot conflict, which prevents unecessary rebuilds for dev-lang/go after backtracking for a missed update #739540 Use cached portage.getpid() function to avoid syscalls Bug: https://bugs.gentoo.org/739718 Bug: https://bugs.gentoo.org/439688 Bug: https://bugs.gentoo.org/739540 Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.5.ebuild | 264 ++++++++++++++++++++++++++++++++++ 2 files changed, 265 insertions(+)