* [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Use fixed location for README.gentoo
@ 2021-08-15 10:55 Ulrich Müller
2021-08-16 20:13 ` Mike Gilbert
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Ulrich Müller @ 2021-08-15 10:55 UTC (permalink / raw
To: gentoo-dev; +Cc: Pacho Ramos, Ulrich Müller
Eclass documentation and the elog message indicate that the expected
location to install the file is /usr/share/doc/${PF}/README.gentoo,
not the location of the ebuild's last docinto call.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/readme.gentoo-r1.eclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index 69d0e1c5c6b4..bebdba5b705a 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.eclass
@@ -76,7 +76,10 @@ readme.gentoo_create_doc() {
die "You are not specifying README.gentoo contents!"
fi
- dodoc "${T}"/README.gentoo
+ ( # subshell to avoid pollution of calling environment
+ docinto .
+ dodoc "${T}"/README.gentoo
+ )
README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo")
}
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Use fixed location for README.gentoo
2021-08-15 10:55 [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Use fixed location for README.gentoo Ulrich Müller
@ 2021-08-16 20:13 ` Mike Gilbert
2021-08-17 4:53 ` Ulrich Mueller
2021-08-17 4:51 ` [gentoo-dev] [PATCH v2 1/2] " Ulrich Müller
2021-08-17 4:51 ` [gentoo-dev] [PATCH v2 2/2] readme.gentoo-r1.eclass: Standardize EAPI guard Ulrich Müller
2 siblings, 1 reply; 6+ messages in thread
From: Mike Gilbert @ 2021-08-16 20:13 UTC (permalink / raw
To: Gentoo Dev; +Cc: Pacho Ramos, Ulrich Müller
On Sun, Aug 15, 2021 at 6:55 AM Ulrich Müller <ulm@gentoo.org> wrote:
>
> Eclass documentation and the elog message indicate that the expected
> location to install the file is /usr/share/doc/${PF}/README.gentoo,
> not the location of the ebuild's last docinto call.
>
> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
> ---
> eclass/readme.gentoo-r1.eclass | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
> index 69d0e1c5c6b4..bebdba5b705a 100644
> --- a/eclass/readme.gentoo-r1.eclass
> +++ b/eclass/readme.gentoo-r1.eclass
> @@ -76,7 +76,10 @@ readme.gentoo_create_doc() {
> die "You are not specifying README.gentoo contents!"
> fi
>
> - dodoc "${T}"/README.gentoo
> + ( # subshell to avoid pollution of calling environment
> + docinto .
> + dodoc "${T}"/README.gentoo
> + )
I believe the current handling "die" in subshells terminates execution
at the end of the current phase.
Maybe add "|| die" after the subshell so that execution stops
immediately if dodoc fails.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-dev] [PATCH v2 1/2] readme.gentoo-r1.eclass: Use fixed location for README.gentoo
2021-08-15 10:55 [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Use fixed location for README.gentoo Ulrich Müller
2021-08-16 20:13 ` Mike Gilbert
@ 2021-08-17 4:51 ` Ulrich Müller
2021-08-17 4:51 ` [gentoo-dev] [PATCH v2 2/2] readme.gentoo-r1.eclass: Standardize EAPI guard Ulrich Müller
2 siblings, 0 replies; 6+ messages in thread
From: Ulrich Müller @ 2021-08-17 4:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Pacho Ramos, Ulrich Müller
Eclass documentation and the elog message indicate that the expected
location to install the file is /usr/share/doc/${PF}/README.gentoo,
not the location of the ebuild's last docinto call.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/readme.gentoo-r1.eclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index 69d0e1c5c6b4..e47e1ac20af6 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.eclass
@@ -76,7 +76,10 @@ readme.gentoo_create_doc() {
die "You are not specifying README.gentoo contents!"
fi
- dodoc "${T}"/README.gentoo
+ ( # subshell to avoid pollution of calling environment
+ docinto .
+ dodoc "${T}"/README.gentoo
+ ) || die
README_GENTOO_DOC_VALUE=$(< "${T}/README.gentoo")
}
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-dev] [PATCH v2 2/2] readme.gentoo-r1.eclass: Standardize EAPI guard
2021-08-15 10:55 [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Use fixed location for README.gentoo Ulrich Müller
2021-08-16 20:13 ` Mike Gilbert
2021-08-17 4:51 ` [gentoo-dev] [PATCH v2 1/2] " Ulrich Müller
@ 2021-08-17 4:51 ` Ulrich Müller
2021-08-18 7:50 ` [gentoo-dev] " Pacho Ramos
2 siblings, 1 reply; 6+ messages in thread
From: Ulrich Müller @ 2021-08-17 4:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Pacho Ramos, Ulrich Müller
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
eclass/readme.gentoo-r1.eclass | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
index e47e1ac20af6..3ad36fac2588 100644
--- a/eclass/readme.gentoo-r1.eclass
+++ b/eclass/readme.gentoo-r1.eclass
@@ -20,15 +20,9 @@
if [[ -z ${_README_GENTOO_ECLASS} ]]; then
_README_GENTOO_ECLASS=1
-case "${EAPI:-0}" in
- 0|1|2|3|4|5)
- die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
- ;;
- 6|7|8)
- ;;
- *)
- die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
- ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @ECLASS-VARIABLE: DISABLE_AUTOFORMATTING
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Use fixed location for README.gentoo
2021-08-16 20:13 ` Mike Gilbert
@ 2021-08-17 4:53 ` Ulrich Mueller
0 siblings, 0 replies; 6+ messages in thread
From: Ulrich Mueller @ 2021-08-17 4:53 UTC (permalink / raw
To: Mike Gilbert; +Cc: Gentoo Dev, Pacho Ramos
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
>>>>> On Mon, 16 Aug 2021, Mike Gilbert wrote:
> On Sun, Aug 15, 2021 at 6:55 AM Ulrich Müller <ulm@gentoo.org> wrote:
>> + ( # subshell to avoid pollution of calling environment
>> + docinto .
>> + dodoc "${T}"/README.gentoo
>> + )
> I believe the current handling "die" in subshells terminates execution
> at the end of the current phase.
> Maybe add "|| die" after the subshell so that execution stops
> immediately if dodoc fails.
Good catch. I think it's fine for current EAPIs, but for EAPI 6 we may
have a problem.
Patch v2 will follow.
Ulrich
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gentoo-dev] Re: [PATCH v2 2/2] readme.gentoo-r1.eclass: Standardize EAPI guard
2021-08-17 4:51 ` [gentoo-dev] [PATCH v2 2/2] readme.gentoo-r1.eclass: Standardize EAPI guard Ulrich Müller
@ 2021-08-18 7:50 ` Pacho Ramos
0 siblings, 0 replies; 6+ messages in thread
From: Pacho Ramos @ 2021-08-18 7:50 UTC (permalink / raw
To: Ulrich Müller, gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]
El mar, 17-08-2021 a las 06:51 +0200, Ulrich Müller escribió:
> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
> ---
> eclass/readme.gentoo-r1.eclass | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/eclass/readme.gentoo-r1.eclass b/eclass/readme.gentoo-r1.eclass
> index e47e1ac20af6..3ad36fac2588 100644
> --- a/eclass/readme.gentoo-r1.eclass
> +++ b/eclass/readme.gentoo-r1.eclass
> @@ -20,15 +20,9 @@
> if [[ -z ${_README_GENTOO_ECLASS} ]]; then
> _README_GENTOO_ECLASS=1
>
> -case "${EAPI:-0}" in
> - 0|1|2|3|4|5)
> - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
> - ;;
> - 6|7|8)
> - ;;
> - *)
> - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
> - ;;
> +case ${EAPI} in
> + 6|7|8) ;;
> + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
> esac
>
> # @ECLASS-VARIABLE: DISABLE_AUTOFORMATTING
LGTM
Thanks a lot!
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-18 7:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-15 10:55 [gentoo-dev] [PATCH] readme.gentoo-r1.eclass: Use fixed location for README.gentoo Ulrich Müller
2021-08-16 20:13 ` Mike Gilbert
2021-08-17 4:53 ` Ulrich Mueller
2021-08-17 4:51 ` [gentoo-dev] [PATCH v2 1/2] " Ulrich Müller
2021-08-17 4:51 ` [gentoo-dev] [PATCH v2 2/2] readme.gentoo-r1.eclass: Standardize EAPI guard Ulrich Müller
2021-08-18 7:50 ` [gentoo-dev] " Pacho Ramos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox