public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] efmtutil-sys: use ebegin/eend and log output
@ 2024-04-04 13:01 Florian Schmaus
  2024-04-04 13:04 ` [gentoo-dev] " Florian Schmaus
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Schmaus @ 2024-04-04 13:01 UTC (permalink / raw)
  To: gentoo-dev; +Cc: tex, Florian Schmaus

Use ebegin/eend and instead of redirecting the output to /dev/null
capture stdout and stderr under a file under $T.

Signed-off-by: Florian Schmaus <flow@gentoo.org>
---
 eclass/texlive-common.eclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 66d3999bd103..0cc61f735cb2 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -199,9 +199,11 @@ etexmf-update() {
 efmtutil-sys() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
-			einfo "Rebuilding formats"
-			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
-				die -n "fmtutil-sys returned non-zero exit status ${?}"
+			ebegin "Rebuilding TexLive formats"
+			"${EPREFIX}"/usr/bin/fmtutil-sys --all \
+						> "${T}"/fmutil-sys-all.log \
+						&> "${T}"/fmutil-sys-all.err.log
+			eend $? || die -n "fmtutil-sys returned non-zero exit status ${?}"
 		else
 			ewarn "Cannot run fmtutil-sys for some reason."
 			ewarn "Your formats might be inconsistent with your installed ${PN} version"
-- 
2.43.2



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

* [gentoo-dev] Re: [PATCH] efmtutil-sys: use ebegin/eend and log output
  2024-04-04 13:01 [gentoo-dev] [PATCH] efmtutil-sys: use ebegin/eend and log output Florian Schmaus
@ 2024-04-04 13:04 ` Florian Schmaus
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Schmaus @ 2024-04-04 13:04 UTC (permalink / raw)
  To: gentoo-dev; +Cc: tex


[-- Attachment #1.1.1: Type: text/plain, Size: 1218 bytes --]

I just noticed two things seconds after sending the patch:

Commit message is missing "texlive-common.eclass" prefix.

On 04/04/2024 15.01, Florian Schmaus wrote:
> Use ebegin/eend and instead of redirecting the output to /dev/null
> capture stdout and stderr under a file under $T.
> 
> Signed-off-by: Florian Schmaus <flow@gentoo.org>
> ---
>   eclass/texlive-common.eclass | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
> index 66d3999bd103..0cc61f735cb2 100644
> --- a/eclass/texlive-common.eclass
> +++ b/eclass/texlive-common.eclass
> @@ -199,9 +199,11 @@ etexmf-update() {
>   efmtutil-sys() {
>   	if has_version 'app-text/texlive-core' ; then
>   		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/bin/fmtutil-sys ]] ; then
> -			einfo "Rebuilding formats"
> -			"${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null ||
> -				die -n "fmtutil-sys returned non-zero exit status ${?}"
> +			ebegin "Rebuilding TexLive formats"
> +			"${EPREFIX}"/usr/bin/fmtutil-sys --all \
> +						> "${T}"/fmutil-sys-all.log \
> +						&> "${T}"/fmutil-sys-all.err.log
This should be 2> instead of &>

- Flow

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 17797 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

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

end of thread, other threads:[~2024-04-04 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-04 13:01 [gentoo-dev] [PATCH] efmtutil-sys: use ebegin/eend and log output Florian Schmaus
2024-04-04 13:04 ` [gentoo-dev] " Florian Schmaus

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