Richard W.M. Jones
2016-Feb-25 08:59 UTC
[Libguestfs] [PATCH] perl: Don't embed API number in Sys::Guestfs.
It means you have to rerun `make -C perl clean ; make' every time you add an API, and is useless anyway. --- generator/perl.ml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/generator/perl.ml b/generator/perl.ml index 5250ce1..f11477b 100644 --- a/generator/perl.ml +++ b/generator/perl.ml @@ -722,16 +722,17 @@ package Sys::Guestfs; use strict; use warnings; -# This version number changes whenever a new function -# is added to the libguestfs API. It is not directly -# related to the libguestfs version number. +# This is always 1.0, never changes, and is unrelated to the +# real libguestfs version. If you want to find the libguestfs +# library version, use $g->version. If you want to test if +# APIs/parameters are present, use %%guestfs_introspection. use vars qw($VERSION); -$VERSION = '0.%d'; +$VERSION = '1.0'; require XSLoader; XSLoader::load ('Sys::Guestfs'); -" max_proc_nr; +"; (* Methods. *) pr "\ -- 2.5.0
Pino Toscano
2016-Feb-26 10:54 UTC
Re: [Libguestfs] [PATCH] perl: Don't embed API number in Sys::Guestfs.
On Thursday 25 February 2016 08:59:18 Richard W.M. Jones wrote:> It means you have to rerun `make -C perl clean ; make' every time you > add an API, and is useless anyway. > --- > generator/perl.ml | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/generator/perl.ml b/generator/perl.ml > index 5250ce1..f11477b 100644 > --- a/generator/perl.ml > +++ b/generator/perl.ml > @@ -722,16 +722,17 @@ package Sys::Guestfs; > use strict; > use warnings; > > -# This version number changes whenever a new function > -# is added to the libguestfs API. It is not directly > -# related to the libguestfs version number. > +# This is always 1.0, never changes, and is unrelated to the > +# real libguestfs version. If you want to find the libguestfs > +# library version, use $g->version. If you want to test if > +# APIs/parameters are present, use %%guestfs_introspection. > use vars qw($VERSION); > -$VERSION = '0.%d'; > +$VERSION = '1.0';Why don't we just put the libguestfs version as module version? (doing the same in other bindings as well.) -- Pino Toscano
Richard W.M. Jones
2016-Feb-26 11:00 UTC
Re: [Libguestfs] [PATCH] perl: Don't embed API number in Sys::Guestfs.
On Fri, Feb 26, 2016 at 11:54:05AM +0100, Pino Toscano wrote:> On Thursday 25 February 2016 08:59:18 Richard W.M. Jones wrote: > > It means you have to rerun `make -C perl clean ; make' every time you > > add an API, and is useless anyway. > > --- > > generator/perl.ml | 11 ++++++----- > > 1 file changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/generator/perl.ml b/generator/perl.ml > > index 5250ce1..f11477b 100644 > > --- a/generator/perl.ml > > +++ b/generator/perl.ml > > @@ -722,16 +722,17 @@ package Sys::Guestfs; > > use strict; > > use warnings; > > > > -# This version number changes whenever a new function > > -# is added to the libguestfs API. It is not directly > > -# related to the libguestfs version number. > > +# This is always 1.0, never changes, and is unrelated to the > > +# real libguestfs version. If you want to find the libguestfs > > +# library version, use $g->version. If you want to test if > > +# APIs/parameters are present, use %%guestfs_introspection. > > use vars qw($VERSION); > > -$VERSION = '0.%d'; > > +$VERSION = '1.0'; > > Why don't we just put the libguestfs version as module version? > (doing the same in other bindings as well.)That would be worse because it would mean you'd have to 'make -C perl clean' on every release. More to the point it cannot be done because the generator doesn't know the version number (and doesn't need to know the version). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Apparently Analagous Threads
- [PATCH] perl: Don't embed API number in Sys::Guestfs.
- [PATCH] perl: drop %guestfs_introspection stuff
- Re: [PATCH 1/3] perl: Add =encoding to Sys::Guestfs man page.
- [virt-tools-list] find0 in (perl) Sys::Guestfs
- Re: Problem Connecting to RBD images using Sys::Guestfs Perl Module