This issue may appear when the install phase needs to follow non-relative symlinks; however, the specific example exposing the issue is when relative symlinks need to be followed. The issue was exposed at https://github.com/cschwan/sage-on-gentoo/issues/660 where during the install of sage-doc-9999 we get chatter like grep: /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/jupyter/kernels/sagemath/doc: Is a directory grep: /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/doc/sage-doc-9999/pdf/en/reference/_static: Is a directory grep: /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/doc/sage-doc-9999/html/fr/tutorial/_static: Is a directory grep: /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/_static: Is a directory grep: /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/doc/sage-doc-9999/html/en/prep/_static: Is a directory grep: /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/doc/sage-doc-9999/html/en/_static: Is a directory For example, for the first 'grep:' item, usr/share/jupyter/kernels/sagemath/doc is a relative symlink to a folder /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/jupyter/kernels/sagemath/doc -> ../../../doc/sage-doc-9999/html/en with contents ls -al /storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/sage-doc-9999/image/storage/strogdon/gentoo-rap/usr/share/jupyter/kernels/sagemath/doc/ total 104 drwxr-xr-x 13 terry terry 4096 Nov 23 18:16 . drwxr-xr-x 5 terry terry 4096 Nov 23 18:16 .. drwxr-xr-x 4 terry terry 4096 Nov 23 18:16 a_tour_of_sage -rw-r--r-- 1 terry terry 230 Nov 23 18:15 .buildinfo drwxr-xr-x 4 terry terry 4096 Nov 23 18:16 constructions drwxr-xr-x 4 terry terry 4096 Nov 23 18:16 developer drwxr-xr-x 3 terry terry 4096 Nov 23 18:16 faq -rw-r--r-- 1 terry terry 6274 Nov 23 18:15 genindex-all.html -rw-r--r-- 1 terry terry 6434 Nov 23 18:15 genindex.html -rw-r--r-- 1 terry terry 12629 Nov 23 18:15 index.html drwxr-xr-x 3 terry terry 4096 Nov 23 18:16 installation -rw-r--r-- 1 terry terry 257 Nov 23 18:15 objects.inv drwxr-xr-x 5 terry terry 4096 Nov 23 18:16 prep drwxr-xr-x 81 terry terry 4096 Nov 23 18:16 reference -rw-r--r-- 1 terry terry 6826 Nov 23 18:15 search.html -rw-r--r-- 1 terry terry 619 Nov 23 18:15 searchindex.js drwxr-xr-x 2 terry terry 4096 Nov 23 18:16 _sources lrwxrwxrwx 1 terry terry 10 Nov 23 18:15 _static -> ../_static drwxr-xr-x 10 terry terry 4096 Nov 23 18:16 thematic_tutorials drwxr-xr-x 3 terry terry 4096 Nov 23 18:16 tutorial drwxr-xr-x 3 terry terry 4096 Nov 23 18:16 website We were able to remove the chatter by changing # this is hell expensive, but how else? find "${ED}" -executable \! -type d -print0 \ to # this is hell expensive, but how else? find -L "${ED}" -executable \! -type d -print0 \ in ${EPREFIX}/usr/lib/portage/python3.9/install-qa-check.d/05prefix so that the 'find' command would properly follow relative symlinks.
In summary that find command in `install-qa-check.d/05prefix` tries to find executables and then checks them to see if shebangs need to be replaced if they are scripts. The find command tries to make sure its results are executable and not directories but completely misses out on links to directories. The extra `-L` takes care of that scenario.
Please always reports in title the category/app to make bug wrangling faster. I'd suggest to use a title like -- sci-mathematics/sage-doc-9999:install phase does not properly follow relative symlinks to folders, resulting in 'grep' chatter.
(In reply to Marco Scardovi (scardracs) from comment #2) > Please always reports in title the category/app to make bug wrangling > faster. I'd suggest to use a title like -- > sci-mathematics/sage-doc-9999:install phase does not properly follow > relative symlinks to folders, resulting in 'grep' chatter. Even we have identified that the bug is not in fact in the ebuild but in portage?
Yes, this is a portage issue. The referenced ebuild, sci-mathematics/sage-doc-9999 is only needed to expose the defect.