Skip to content

Commit

Permalink
dev-util/ccache: fix ROOT=/ detection
Browse files Browse the repository at this point in the history
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 <[email protected]>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
  • Loading branch information
Sergei Trofimovich committed Oct 28, 2018
1 parent bf1b659 commit 720c875
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ ccache now supports sys-devel/clang and dev-lang/icc, too!"
}

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

Expand Down

0 comments on commit 720c875

Please sign in to comment.