[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] Re: [PATCH 1/3] texlive-module.eclass: implicitly set TL_PV if not explicitly set
From:       Michał_Górny <mgorny () gentoo ! org>
Date:       2024-02-29 14:37:14
Message-ID: 980d8db20e0a28535929ef75f3a5d6683cf331c8.camel () gentoo ! org
[Download RAW message or body]


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


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic