Mailing List Archive

[PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys
Signed-off-by: Florian Schmaus <flow@gentoo.org>
---
eclass/texlive-common.eclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 96e962cb8027..85cdb8ff204e 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -199,7 +199,8 @@ 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
+ "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null \
+ || die -n "fmtutil-sys returned non-zero exit status ${res}"
else
ewarn "Cannot run fmtutil-sys for some reason."
ewarn "Your formats might be inconsistent with your installed ${PN} version"
--
2.43.0
Re: [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys [ In reply to ]
On Thu, 2024-02-29 at 14:38 +0100, Florian Schmaus wrote:
> Signed-off-by: Florian Schmaus <flow@gentoo.org>
> ---
> eclass/texlive-common.eclass | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
> index 96e962cb8027..85cdb8ff204e 100644
> --- a/eclass/texlive-common.eclass
> +++ b/eclass/texlive-common.eclass
> @@ -199,7 +199,8 @@ 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
> + "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null \
> + || die -n "fmtutil-sys returned non-zero exit status ${res}"

Put '||' at end of the line, then you won't need the redundant
backslash.

> else
> ewarn "Cannot run fmtutil-sys for some reason."
> ewarn "Your formats might be inconsistent with your installed ${PN} version"

--
Best regards,
Micha? Górny
Re: [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys [ In reply to ]
>>>>> On Thu, 29 Feb 2024, Micha? Górny wrote:

>> + "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null \
>> + || die -n "fmtutil-sys returned non-zero exit status ${res}"

> Put '||' at end of the line, then you won't need the redundant
> backslash.

I don't think we have such a policy, so || at end of line or beginning
of next line is really up to personal preference.

Independent of this, looks like ${res} is not defined?

Ulrich