For tools that need to perform multiple operations on a binary package repository (like eclean-pkg does), it would be nice if they could acquire a reentrant lock on the repository, similar the existing reentrant lock/unlock methods provided by the vardbapi class.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/5c1414c631c1460b5c5d52e0dff48d96 https://github.com/gentoo/portage/pull/425