commit:     720c875cfe1d2f3962a7b6e9834089763ada79a9
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 28 11:05:43 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Oct 28 11:19:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=720c875c

dev-util/ccache: fix ROOT=/ detection

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 <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-util/ccache/{ccache-3.5.ebuild => ccache-3.5-r1.ebuild} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-util/ccache/ccache-3.5.ebuild 
b/dev-util/ccache/ccache-3.5-r1.ebuild
similarity index 95%
rename from dev-util/ccache/ccache-3.5.ebuild
rename to dev-util/ccache/ccache-3.5-r1.ebuild
index e2a525cad94..d1a32f96e90 100644
--- a/dev-util/ccache/ccache-3.5.ebuild
+++ b/dev-util/ccache/ccache-3.5-r1.ebuild
@@ -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
 

Reply via email to