The line [[ ${file} != /* ]] && file="${root}${file}" expects that ${root} has a trailing slash, but ${root} is one of ${ED} or ${EROOT} (or ${D} or ${ROOT} as a fallback). Hence, fcaps breaks with EAPI 7 where these variables lack a trailing slash. A possible solution is to replace the line by [[ ${file} != /* ]] && file="${root%/}/${file}"
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06ac51cf5bdb3220d427819cdfafdab231e4a4f8 commit 06ac51cf5bdb3220d427819cdfafdab231e4a4f8 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2018-05-08 14:38:31 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2018-05-08 14:38:31 +0000 fcaps.eclass: don't assume D and ROOT end with a slash Closes: https://bugs.gentoo.org/655244 eclass/fcaps.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)