At least on portage EAPI=7 lacks trailing slashes in absolute paths.
This makes ROOT="/" a ROOT="".
It's arguably not an absolute path anymore but it's what we get.
Make expansion work for both ROOT="/" and ROOT="",
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
}
pkg_prerm() {
- if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]] ; then
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT:-/} == / ]] ; then
eselect compiler-shadow remove ccache
fi
}
pkg_postinst() {
- if [[ ${ROOT} == / ]]; then
+ if [[ ${ROOT:-/} == / ]]; then
eselect compiler-shadow update ccache
fi