aboutsummaryrefslogtreecommitdiff
blob: 81e5bb65e8a857fea7eb2e608312731aca9af2b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -43,7 +43,7 @@
 
 # Support variables for Gentoo Prefix
 EPREFIX="@EPREFIX@"
-EROOT="${ROOT%/}${EPREFIX}"
+EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}"
 
 # Remove all alias definitions. Unset functions and variables that are
 # known to cause trouble.