public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/3] *** Three minor changes to texlive-(common|mmodule).elcass ***
@ 2024-02-29 13:38 Florian Schmaus
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set Florian Schmaus
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Florian Schmaus @ 2024-02-29 13:38 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

Following are three minor changes to texlive-(common|module).eclass,
which I expect to be the last changes to the eclasses before start
moving texlive 2023 from ::tex-overlay into ::gentoo (initally
pmasked).

Florian Schmaus (3):
  texlive-module.eclass: implicitly set TL_PV if not explicitly set
  texlive-common.eclass: check exit status of texmf-update
  texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys

 eclass/texlive-common.eclass | 7 ++++++-
 eclass/texlive-module.eclass | 6 ++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

-- 
2.43.0



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

* [gentoo-dev] [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
  2024-02-29 13:38 [gentoo-dev] [PATCH 0/3] *** Three minor changes to texlive-(common|mmodule).elcass *** Florian Schmaus
@ 2024-02-29 13:38 ` Florian Schmaus
  2024-02-29 13:47   ` [gentoo-dev] " Florian Schmaus
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update Florian Schmaus
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys Florian Schmaus
  2 siblings, 1 reply; 15+ messages in thread
From: Florian Schmaus @ 2024-02-29 13:38 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

Signed-off-by: Florian Schmaus <flow@gentoo.org>
---
 eclass/texlive-module.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
index afcd4532975a..d1bf0f86185b 100644
--- a/eclass/texlive-module.eclass
+++ b/eclass/texlive-module.eclass
@@ -85,6 +85,12 @@ HOMEPAGE="https://www.tug.org/texlive/"
 
 IUSE="doc source"
 
+if [[ -z ${TL_PV} ]] \
+	   && [[ ${EAPI} -ge 8 ]] \
+	   && [[ ${CATEGORY} == dev-texlive ]]; then
+	TL_PV=$(ver_cut 1)
+fi
+
 RDEPEND=">=app-text/texlive-core-${TL_PV:-${PV}}"
 # We do not need anything from SYSROOT:
 #   Everything is built from the texlive install in /
-- 
2.43.0



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

* [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update
  2024-02-29 13:38 [gentoo-dev] [PATCH 0/3] *** Three minor changes to texlive-(common|mmodule).elcass *** Florian Schmaus
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set Florian Schmaus
@ 2024-02-29 13:38 ` Florian Schmaus
  2024-02-29 20:40   ` Ulrich Mueller
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys Florian Schmaus
  2 siblings, 1 reply; 15+ messages in thread
From: Florian Schmaus @ 2024-02-29 13:38 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

The texlive eclasses where traditionally lenient when it comes to the
exit status of texmf-update and fmtutil-sys, as they would return a
non-zero exit status in certain situations, especially when bootstraping
the texlive installation, i.e., when texlive-core is installed.

With the upcoming Texlive 2023 bbump we can make this more strict,
having texlive-core use nonfatal.

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

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index fab6ff66ecd5..96e962cb8027 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -178,6 +178,10 @@ etexmf-update() {
 	if has_version 'app-text/texlive-core' ; then
 		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
 			"${EPREFIX}"/usr/sbin/texmf-update
+			local res="${?}"
+			if [[ "${?}" -ne 0 ]] && ver_test -ge 2023; then
+				die -n "texmf-update returned non-zero exit status ${res}"
+			fi
 		else
 			ewarn "Cannot run texmf-update for some reason."
 			ewarn "Your texmf tree might be inconsistent with your configuration"
-- 
2.43.0



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

* [gentoo-dev] [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys
  2024-02-29 13:38 [gentoo-dev] [PATCH 0/3] *** Three minor changes to texlive-(common|mmodule).elcass *** Florian Schmaus
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set Florian Schmaus
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update Florian Schmaus
@ 2024-02-29 13:38 ` Florian Schmaus
  2024-02-29 14:38   ` Michał Górny
  2 siblings, 1 reply; 15+ messages in thread
From: Florian Schmaus @ 2024-02-29 13:38 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

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



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

* [gentoo-dev] Re: [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set Florian Schmaus
@ 2024-02-29 13:47   ` Florian Schmaus
  2024-02-29 14:08     ` Michael Orlitzky
  0 siblings, 1 reply; 15+ messages in thread
From: Florian Schmaus @ 2024-02-29 13:47 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Paul Zander, tex


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

On 29/02/2024 14.38, Florian Schmaus wrote:
> Signed-off-by: Florian Schmaus <flow@gentoo.org>
> ---
>   eclass/texlive-module.eclass | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
> index afcd4532975a..d1bf0f86185b 100644
> --- a/eclass/texlive-module.eclass
> +++ b/eclass/texlive-module.eclass
> @@ -85,6 +85,12 @@ HOMEPAGE="https://www.tug.org/texlive/"
>   
>   IUSE="doc source"
>   
> +if [[ -z ${TL_PV} ]] \
> +	   && [[ ${EAPI} -ge 8 ]] \

I am skeptical of this construct, as in the past we had non-numeric 
EAPIs. So I may have to go with EAPI == 8 for now. Input appreciated.

- 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] 15+ messages in thread

* Re: [gentoo-dev] Re: [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
  2024-02-29 13:47   ` [gentoo-dev] " Florian Schmaus
@ 2024-02-29 14:08     ` Michael Orlitzky
  2024-02-29 14:21       ` Florian Schmaus
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Orlitzky @ 2024-02-29 14:08 UTC (permalink / raw)
  To: gentoo-dev

On Thu, 2024-02-29 at 14:47 +0100, Florian Schmaus wrote:
> >   
> > +if [[ -z ${TL_PV} ]] \
> > +	   && [[ ${EAPI} -ge 8 ]] \
> 
> I am skeptical of this construct, as in the past we had non-numeric 
> EAPIs. So I may have to go with EAPI == 8 for now. Input appreciated.
> 


The eclass only supports EAPIs {7,8,...} so it should suffice to
blacklist EAPI=7.



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

* Re: [gentoo-dev] Re: [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
  2024-02-29 14:08     ` Michael Orlitzky
@ 2024-02-29 14:21       ` Florian Schmaus
  2024-02-29 14:34         ` Michael Orlitzky
  2024-02-29 14:37         ` Michał Górny
  0 siblings, 2 replies; 15+ messages in thread
From: Florian Schmaus @ 2024-02-29 14:21 UTC (permalink / raw)
  To: gentoo-dev


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

On 29/02/2024 15.08, Michael Orlitzky wrote:
> On Thu, 2024-02-29 at 14:47 +0100, Florian Schmaus wrote:
>>>    
>>> +if [[ -z ${TL_PV} ]] \
>>> +	   && [[ ${EAPI} -ge 8 ]] \
>>
>> I am skeptical of this construct, as in the past we had non-numeric
>> EAPIs. So I may have to go with EAPI == 8 for now. Input appreciated.
>>
> 
> 
> The eclass only supports EAPIs {7,8,...} so it should suffice to
> blacklist EAPI=7.

Fair point, but that would mean to remember to adjust this line once the 
eclass gets support for EAPI 9.

It appears that bash does the right thing:

$ if [[ "eapi-future" -gt 8 ]]; then echo "is greater than 8"; else echo 
"is NOT greater than 8"; fi
is NOT greater than 8

even considering

$ if [[ "9-eapi-future" -gt 8 ]]; then echo "is greater than 8"; else 
echo "is NOT greater than 8"; fi
is greater than 8

which would be fine.

Although I prefer the current approach, it is not a hill to die on for me.

- 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] 15+ messages in thread

* Re: [gentoo-dev] Re: [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
  2024-02-29 14:21       ` Florian Schmaus
@ 2024-02-29 14:34         ` Michael Orlitzky
  2024-02-29 14:36           ` Florian Schmaus
  2024-02-29 14:37         ` Michał Górny
  1 sibling, 1 reply; 15+ messages in thread
From: Michael Orlitzky @ 2024-02-29 14:34 UTC (permalink / raw)
  To: gentoo-dev

On Thu, 2024-02-29 at 15:21 +0100, Florian Schmaus wrote:
> > 
> > The eclass only supports EAPIs {7,8,...} so it should suffice to
> > blacklist EAPI=7.
> 
> Fair point, but that would mean to remember to adjust this line once the 
> eclass gets support for EAPI 9.
> 

It should do the right thing automatically when EAPI=9 is added, no? If
the goal of "-gt 8" is to match EAPI=8 and newer, then rejecting (only)
the one EAPI that's older than 8 should be equivalent without involving
a numerical comparison.


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

* Re: [gentoo-dev] Re: [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
  2024-02-29 14:34         ` Michael Orlitzky
@ 2024-02-29 14:36           ` Florian Schmaus
  0 siblings, 0 replies; 15+ messages in thread
From: Florian Schmaus @ 2024-02-29 14:36 UTC (permalink / raw)
  To: gentoo-dev


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

On 29/02/2024 15.34, Michael Orlitzky wrote:
> On Thu, 2024-02-29 at 15:21 +0100, Florian Schmaus wrote:
>>>
>>> The eclass only supports EAPIs {7,8,...} so it should suffice to
>>> blacklist EAPI=7.
>>
>> Fair point, but that would mean to remember to adjust this line once the
>> eclass gets support for EAPI 9.
>>
> 
> It should do the right thing automatically when EAPI=9 is added, no? If
> the goal of "-gt 8" is to match EAPI=8 and newer, then rejecting (only)
> the one EAPI that's older than 8 should be equivalent without involving
> a numerical comparison.

Of course, you are right. Not sure how I could miss that.

I'll go with [[ ${EAPI} != 7 ]] then.

Thanks

- 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] 15+ messages in thread

* Re: [gentoo-dev] Re: [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
  2024-02-29 14:21       ` Florian Schmaus
  2024-02-29 14:34         ` Michael Orlitzky
@ 2024-02-29 14:37         ` Michał Górny
  1 sibling, 0 replies; 15+ messages in thread
From: Michał Górny @ 2024-02-29 14:37 UTC (permalink / raw)
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1317 bytes --]

On Thu, 2024-02-29 at 15:21 +0100, Florian Schmaus wrote:
> On 29/02/2024 15.08, Michael Orlitzky wrote:
> > On Thu, 2024-02-29 at 14:47 +0100, Florian Schmaus wrote:
> > > >    
> > > > +if [[ -z ${TL_PV} ]] \
> > > > +	   && [[ ${EAPI} -ge 8 ]] \
> > > 
> > > I am skeptical of this construct, as in the past we had non-numeric
> > > EAPIs. So I may have to go with EAPI == 8 for now. Input appreciated.
> > > 
> > 
> > 
> > The eclass only supports EAPIs {7,8,...} so it should suffice to
> > blacklist EAPI=7.
> 
> Fair point, but that would mean to remember to adjust this line once the 
> eclass gets support for EAPI 9.
> 
> It appears that bash does the right thing:
> 
> $ if [[ "eapi-future" -gt 8 ]]; then echo "is greater than 8"; else echo 
> "is NOT greater than 8"; fi
> is NOT greater than 8
> 
> even considering
> 
> $ if [[ "9-eapi-future" -gt 8 ]]; then echo "is greater than 8"; else 
> echo "is NOT greater than 8"; fi
> is greater than 8
> 
> which would be fine.
> 
> Although I prefer the current approach, it is not a hill to die on for me.
> 

It is invalid to treat EAPI as an integer.

The standard practice is to explicitly list old EAPIs, so that no
changes need to preserve the new behavior for new EAPIs.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

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

* Re: [gentoo-dev] [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys Florian Schmaus
@ 2024-02-29 14:38   ` Michał Górny
  2024-02-29 20:37     ` Ulrich Mueller
  0 siblings, 1 reply; 15+ messages in thread
From: Michał Górny @ 2024-02-29 14:38 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Paul Zander, tex, Florian Schmaus

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

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


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

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

* Re: [gentoo-dev] [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys
  2024-02-29 14:38   ` Michał Górny
@ 2024-02-29 20:37     ` Ulrich Mueller
  0 siblings, 0 replies; 15+ messages in thread
From: Ulrich Mueller @ 2024-02-29 20:37 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny, Paul Zander, tex, Florian Schmaus

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

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

* Re: [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update
  2024-02-29 13:38 ` [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update Florian Schmaus
@ 2024-02-29 20:40   ` Ulrich Mueller
  2024-03-01  8:47     ` Florian Schmaus
  0 siblings, 1 reply; 15+ messages in thread
From: Ulrich Mueller @ 2024-02-29 20:40 UTC (permalink / raw)
  To: Florian Schmaus; +Cc: gentoo-dev, Paul Zander, tex

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

>>>>> On Thu, 29 Feb 2024, Florian Schmaus wrote:

> @@ -178,6 +178,10 @@ etexmf-update() {
>  	if has_version 'app-text/texlive-core' ; then
>  		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
>  			"${EPREFIX}"/usr/sbin/texmf-update
> +			local res="${?}"
> +			if [[ "${?}" -ne 0 ]] && ver_test -ge 2023; then

This condition will always be false.

Ulrich

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

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

* Re: [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update
  2024-02-29 20:40   ` Ulrich Mueller
@ 2024-03-01  8:47     ` Florian Schmaus
  2024-03-01  9:00       ` Ulrich Mueller
  0 siblings, 1 reply; 15+ messages in thread
From: Florian Schmaus @ 2024-03-01  8:47 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: gentoo-dev, Paul Zander, tex


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

On 29/02/2024 21.40, Ulrich Mueller wrote:
>>>>>> On Thu, 29 Feb 2024, Florian Schmaus wrote:
> 
>> @@ -178,6 +178,10 @@ etexmf-update() {
>>   	if has_version 'app-text/texlive-core' ; then
>>   		if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
>>   			"${EPREFIX}"/usr/sbin/texmf-update
>> +			local res="${?}"
>> +			if [[ "${?}" -ne 0 ]] && ver_test -ge 2023; then
> 
> This condition will always be false.

Is it because assigning 'res' will set '$?'?

- 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] 15+ messages in thread

* Re: [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update
  2024-03-01  8:47     ` Florian Schmaus
@ 2024-03-01  9:00       ` Ulrich Mueller
  0 siblings, 0 replies; 15+ messages in thread
From: Ulrich Mueller @ 2024-03-01  9:00 UTC (permalink / raw)
  To: Florian Schmaus; +Cc: gentoo-dev, Paul Zander, tex

[-- Attachment #1: Type: text/plain, Size: 644 bytes --]

>>>>> On Fri, 01 Mar 2024, Florian Schmaus wrote:

> On 29/02/2024 21.40, Ulrich Mueller wrote:
>>>>>>> On Thu, 29 Feb 2024, Florian Schmaus wrote:
>> 
>>> @@ -178,6 +178,10 @@ etexmf-update() {
>>> if has_version 'app-text/texlive-core' ; then
>>> if [[ -z ${ROOT} && -x "${EPREFIX}"/usr/sbin/texmf-update ]] ; then
>>> "${EPREFIX}"/usr/sbin/texmf-update
>>> +			local res="${?}"
>>> +			if [[ "${?}" -ne 0 ]] && ver_test -ge 2023; then
>> This condition will always be false.

> Is it because assigning 'res' will set '$?'?

Yes, the local command will return success status. So you should check
for ${res} not $?.

Ulrich

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

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

end of thread, other threads:[~2024-03-01  9:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 13:38 [gentoo-dev] [PATCH 0/3] *** Three minor changes to texlive-(common|mmodule).elcass *** Florian Schmaus
2024-02-29 13:38 ` [gentoo-dev] [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set Florian Schmaus
2024-02-29 13:47   ` [gentoo-dev] " Florian Schmaus
2024-02-29 14:08     ` Michael Orlitzky
2024-02-29 14:21       ` Florian Schmaus
2024-02-29 14:34         ` Michael Orlitzky
2024-02-29 14:36           ` Florian Schmaus
2024-02-29 14:37         ` Michał Górny
2024-02-29 13:38 ` [gentoo-dev] [PATCH 2/3] texlive-common.eclass: check exit status of texmf-update Florian Schmaus
2024-02-29 20:40   ` Ulrich Mueller
2024-03-01  8:47     ` Florian Schmaus
2024-03-01  9:00       ` Ulrich Mueller
2024-02-29 13:38 ` [gentoo-dev] [PATCH 3/3] texlive-common.eclass: Use nonfatal-respecting die for fmtutil-sys Florian Schmaus
2024-02-29 14:38   ` Michał Górny
2024-02-29 20:37     ` Ulrich Mueller

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