commit:     1ed8e949399ec73afb736b6ce2b15b93d16b012a
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  4 19:10:37 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 19:14:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ed8e949

rebar.eclass: simplify EPREFIX usage

EPREFIX is never slash terminated, in all EAPIs.

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 eclass/rebar.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
index 5ee99aed445c..c982dea5d1fd 100644
--- a/eclass/rebar.eclass
+++ b/eclass/rebar.eclass
@@ -68,7 +68,7 @@ _rebar_find_dep() {
        local p
        local result
 
-       pushd "${EPREFIX%/}/$(get_erl_libs)" >/dev/null || return 1
+       pushd "${EPREFIX}/$(get_erl_libs)" >/dev/null || return 1
        for p in ${pn} ${pn}-*; do
                if [[ -d ${p} ]]; then
                        # Ensure there's at most one matching.
@@ -107,7 +107,7 @@ erebar() {
 
        (( $# > 0 )) || die "erebar: at least one target is required"
 
-       local -x ERL_LIBS="${EPREFIX%/}/$(get_erl_libs)"
+       local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
        [[ ${1} == eunit ]] && local -x ERL_LIBS="."
 
        rebar -v skip_deps=true "$@" || die -n "rebar $@ failed"
@@ -128,7 +128,7 @@ rebar_fix_include_path() {
 
        local pn="${1}"
        local rebar_config="${2:-rebar.config}"
-       local erl_libs="${EPREFIX%/}/$(get_erl_libs)"
+       local erl_libs="${EPREFIX}/$(get_erl_libs)"
        local p
 
        p="$(_rebar_find_dep "${pn}")" \
@@ -217,7 +217,7 @@ rebar_src_prepare() {
 rebar_src_configure() {
        debug-print-function ${FUNCNAME} "${@}"
 
-       local -x ERL_LIBS="${EPREFIX%/}/$(get_erl_libs)"
+       local -x ERL_LIBS="${EPREFIX}/$(get_erl_libs)"
        default
 }
 

Reply via email to