• [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFI

    From Sam James@21:1/5 to All on Sun Aug 14 20:00:01 2022
    Since EAPI 3, EPREFIX has been defined via PMS. Having this as an
    "eclass variable" in docs is confusing as it implies one needs
    prefix.eclass to provide it.

    Drop it given it adds nothing and causes confusion.

    Reported-by: Aaron W. Swenson <titanofold@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    eclass/prefix.eclass | 14 +-------------
    1 file changed, 1 insertion(+), 13 deletions(-)

    diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
    index 8d50d0ba7b6e..4a8c0e4ff15f 100644
    --- a/eclass/prefix.eclass
    +++ b/eclass/prefix.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2021 Gentoo Authors
    +# Copyright 1999-2022 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: prefix.eclass
    @@ -20,18 +20,6 @@ esac
    if [[ -z ${_PREFIX_ECLASS} ]]; then
    _PREFIX_ECLASS=1

    -# @ECLASS_VARIABLE: EPREFIX
    -# @DESCRIPTION:
    -# The offset prefix of a Gentoo Prefix installation. When Gentoo Prefix
    -# is not used, ${EPREFIX} should be "". Prefix Portage sets EPREFIX,
    -# hence this eclass has nothing to do here in that case.
    -# Note that setting EPREFIX in the environment with Prefix Portage sets
    -# Portage into cross-prefix mode.
    -if [[ ! ${EPREFIX+set} ]]; then
    - export EPREFIX=''
    -fi
    -
    -
    # @FUNCTION: eprefixify
    # @USAGE: <list of to be eprefixifi
  • From Sam James@21:1/5 to All on Sun Aug 14 20:00:01 2022
    I see this mistake quite often still and I think it's worth
    pointing out that multilib.eclass should not be inherited
    purely for get_libdir.

    Reported-by: Aaron W. Swenson <titanofold@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    eclass/multilib.eclass | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
    index e3c0d78a6e43..32b23c4ec52b 100644
    --- a/eclass/multilib.eclass
    +++ b/eclass/multilib.eclass
    @@ -8,6 +8,8 @@
    # @BLURB: This eclass is for all functions pertaining to handling multilib configurations.
    # @DESCRIPTION:
    # This eclass is for all functions pertaining to handling multilib configurations.
    +# (For legacy EAPIs, this eclass was often needed for get_libdir. get_libdir is
    +# provided by EAPI 6+ and hence this eclass isn't needed for that.)

    case ${EAPI} in
    6|7|8) ;;
    --
    2.37.2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Benda Xu@21:1/5 to Sam James on Mon Aug 15 02:20:01 2022
    Sam James <sam@gentoo.org> writes:

    Since EAPI 3, EPREFIX has been defined via PMS. Having this as an
    "eclass variable" in docs is confusing as it implies one needs
    prefix.eclass to provide it.

    Drop it given it adds nothing and causes confusion.

    Reported-by: Aaron W. Swenson <titanofold@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    eclass/prefix.eclass | 14 +-------------
    1 file changed, 1 insertion(+), 13 deletions(-)

    diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
    index 8d50d0ba7b6e..4a8c0e4ff15f 100644
    --- a/eclass/prefix.eclass
    +++ b/eclass/prefix.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2021 Gentoo Authors
    +# Copyright 1999-2022 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: prefix.eclass
    @@ -20,18 +20,6 @@ esac
    if [[ -z ${_PREFIX_ECLASS} ]]; then
    _PREFIX_ECLASS=1

    -# @ECLASS_VARIABLE: EPREFIX
    -# @DESCRIPTION:
    -# The offset prefix of a Gentoo Prefix installation. When Gentoo Prefix
    -# is not used, ${EPREFIX} should be "". Prefix Portage sets EPREFIX,
    -# hence this eclass has nothing to do here in that case.
    -# Note that setting EPREFIX in the environment with Prefix Portage sets
    -# Portage into cross-prefix mode.
    -if [[ ! ${EPREFIX+set} ]]; then
    - export EPREFIX=''
    -fi
    -
    -
    # @FUNCTION: eprefixify
    # @USAGE: <list of to be eprefixified files>
    # @DESCRIPTION:

    LGTM, thanks Sam!

    Yours,
    Benda

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)