Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 856502 - app-misc/elasticsearch-8.2.2 fails when using $ROOT variable
Summary: app-misc/elasticsearch-8.2.2 fails when using $ROOT variable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tomáš Mózes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-05 06:49 UTC by r7l
Modified: 2023-11-03 00:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixed Ebuild with EROOT set (elasticsearch-8.2.2.ebuild,2.78 KB, text/plain)
2022-07-05 06:51 UTC, r7l
Details

Note You need to log in before you can comment on or make changes to this bug.
Description r7l 2022-07-05 06:49:15 UTC
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
Comment 1 r7l 2022-07-05 06:51:24 UTC
Created attachment 790127 [details]
Fixed Ebuild with EROOT set
Comment 2 Matt Jolly gentoo-dev 2023-11-03 00:20:40 UTC
This was fixed a while ago but not linked to the bug. Current versions of Elasticsearch 8.x properly use ${EROOT}