The current situation of RDEPEND/BDEPEND is problematic if you are emerging from binpkgs, as there is no guarantee that sys-libs/libcap will be merged before packages inheriting fcaps.eclass.
I reproduced this by chrooting into a fresh stage3 (stage3-amd64-20200514T210257Z.tar.xz) and updating the system: sys-libs/pam is merged before sys-libs/libcap, thus pkg_postinst() fails.
Created attachment 639408 [details]
Created attachment 639410 [details]
Adding it to DEPEND will not help if you are using binpkgs.
In #gentoo-portage, we discussed moving sys-libs/pam from RDEPEND to PDEPEND in sys-lib/libcap to resolve the circular runtime dep and force libcap to be installed first.
Ouch, you are right, I didn't do my homework. Then I guess I'll look forward to one of the two solutions :)
The bug has been referenced in the following commit(s):
Author: Mike Gilbert <email@example.com>
AuthorDate: 2020-05-17 18:07:55 +0000
Commit: Mike Gilbert <firstname.lastname@example.org>
CommitDate: 2020-05-17 18:11:05 +0000
sys-libs/libcap: move sys-libs/pam from RDEPEND to PDEPEND
Fixes install order for binpkgs.
Signed-off-by: Mike Gilbert <email@example.com>
sys-libs/libcap/libcap-2.26-r2.ebuild | 5 +++--
sys-libs/libcap/libcap-2.27.ebuild | 5 +++--
sys-libs/libcap/libcap-2.33.ebuild | 5 +++--
sys-libs/libcap/libcap-2.34.ebuild | 5 +++--
4 files changed, 12 insertions(+), 8 deletions(-)