In app-misc/elasticsearch-8.2.2 pkg_postinst() hook, there is a line to remove .keep files. This command (and any other) is pointing to a hard coded root and makes the Ebuild fail when installing with $ROOT variable set during emerge. Output: >>> /emerge-root/usr/share/elasticsearch/bin/elasticsearch-keystore >>> /emerge-root/usr/share/elasticsearch/bin/elasticsearch-sql-cli-8.2.2.jar >>> /emerge-root/usr/share/elasticsearch/bin/elasticsearch-reset-password rm: cannot remove '/usr/share/elasticsearch/plugins/.keep*': No such file or directory * ERROR: app-misc/elasticsearch-8.2.2::gentoo failed (postinst phase): * (no error message) * * Call stack: * ebuild.sh, line 127: Called pkg_postinst * environment, line 1248: Called die * The specific snippet of code: * rm /usr/share/${PN}/plugins/.keep* || die; * * If you need support, post the output of `emerge --info '=app-misc/elasticsearch-8.2.2::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-misc/elasticsearch-8.2.2::gentoo'`. * The complete build log is located at '/config/log/app-misc:elasticsearch-8.2.2:20220705-055115.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-misc/elasticsearch-8.2.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-misc/elasticsearch-8.2.2/temp/environment'. * Working directory: '/var/tmp/portage/app-misc/elasticsearch-8.2.2/empty' * S: '/var/tmp/portage/app-misc/elasticsearch-8.2.2/work/elasticsearch-8.2.2' * FAILED postinst: 1 Reproducible: Always Steps to Reproduce: 1. ROOT="/tmp/elasticsearch" emerge elasticsearch
Created attachment 790127 [details] Fixed Ebuild with EROOT set
This was fixed a while ago but not linked to the bug. Current versions of Elasticsearch 8.x properly use ${EROOT}