public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable
@ 2022-08-14 17:58 Sam James
  2022-08-14 17:58 ` [gentoo-dev] [PATCH 2/2] multilib.eclass: add comment on get_libdir usage in main @DESCRIPTION Sam James
  2022-08-15  0:18 ` [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable Benda Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Sam James @ 2022-08-14 17:58 UTC (permalink / raw
  To: gentoo-dev; +Cc: prefix, toolchain, Sam James, Aaron W . Swenson

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:
-- 
2.37.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-dev] [PATCH 2/2] multilib.eclass: add comment on get_libdir usage in main @DESCRIPTION
  2022-08-14 17:58 [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable Sam James
@ 2022-08-14 17:58 ` Sam James
  2022-08-15  0:18 ` [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable Benda Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Sam James @ 2022-08-14 17:58 UTC (permalink / raw
  To: gentoo-dev; +Cc: prefix, toolchain, Sam James, Aaron W . Swenson

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable
  2022-08-14 17:58 [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable Sam James
  2022-08-14 17:58 ` [gentoo-dev] [PATCH 2/2] multilib.eclass: add comment on get_libdir usage in main @DESCRIPTION Sam James
@ 2022-08-15  0:18 ` Benda Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Benda Xu @ 2022-08-15  0:18 UTC (permalink / raw
  To: gentoo-dev

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-15  0:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14 17:58 [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable Sam James
2022-08-14 17:58 ` [gentoo-dev] [PATCH 2/2] multilib.eclass: add comment on get_libdir usage in main @DESCRIPTION Sam James
2022-08-15  0:18 ` [gentoo-dev] [PATCH 1/2] prefix.eclass: don't redundantly define EPREFIX as an eclass variable Benda Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox