Re: [spice-gtk 1/2] meson: fix micro on release tag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > From: Victor Toso <me@xxxxxxxxxxxxxx>
> > > 
> > > On 0.36, there is no third value so we would get:
> > > 
> > >     src/meson.build:11:0: ERROR:  Index 2 out of bounds of array of size
> > >     2.
> > > 
> > > Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
> > > ---
> > >  src/meson.build | 11 ++++++++---
> > >  1 file changed, 8 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/src/meson.build b/src/meson.build
> > > index d9614cb..bf39464 100644
> > > --- a/src/meson.build
> > > +++ b/src/meson.build
> > > @@ -8,10 +8,15 @@ spice_gtk_include += [include_directories('.')]
> > >  version_info = meson.project_version().split('.')

Or here do something like

version_info = (meson.project_version() + '.0.0').split('.')

> > >  major = '@0@'.format(version_info[0])
> > >  minor = '@0@'.format(version_info[1])
> > > -micro = version_info[2].split('-')[0]
> > > -if micro == ''
> > > -  micro = '0'
> > > +if version_info.length() > 2
> > > +    micro = version_info[2].split('-')[0]
> > > +    if micro == ''
> 
> I doubt there would be a version with x.y.-z syntax
> 
> > > +        micro = '0'
> > > +    endif
> > > +else
> > > +        micro = '0'
> > 
> 
> Why not
> 
> micro = '0'
> if version_info.length() > 2
>     micro = version_info[2].split('-')[0]
> endif
> 
> > Copy-paste issue, bad indentation. Fixed locally.
> > 
> > >  endif
> > > +
> > >  version_data = configuration_data()
> > >  version_data.set('SPICE_GTK_MAJOR_VERSION', major)
> > >  version_data.set('SPICE_GTK_MINOR_VERSION', minor)
> 
> Frediano
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]