[virt-tools-list] [virt-viewer] build-sys: Always prepend '-' to build id
Christophe Fergeau
cfergeau at redhat.com
Wed Apr 2 12:18:58 UTC 2014
On Wed, Apr 02, 2014 at 02:02:58PM +0200, Daniel P. Berrange wrote:
> On Wed, Apr 02, 2014 at 01:53:37PM +0200, Christophe Fergeau wrote:
> > When using the --with-buildid configure paramater, the build id which is
> > substituted in the MSI wxs file is automatically prepended by a '-', but
> > the build id which is used in the C files does not get this '-'
> > automatically.
> >
> > Currently, the linux and mingw spec files prepend a '-' on their own to the
> > --with-buildid argument, but this causes the MSI installer to show 2 '-'
> > during installation: "Please wait while Windows configures VirtViewer
> > 0.6.0--1"
> >
> > This commit always prepends a '-' to the buildid strings, and removes the
> > '-' from the spec files. This is to ensure the separator between version
> > number and buildid is not forgotten, which could give a confusing version
> > number.
> > ---
> > configure.ac | 2 +-
> > mingw-virt-viewer.spec.in | 2 +-
> > virt-viewer.spec.in | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 7a00bf4..c553dae 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -212,7 +212,7 @@ fi
> >
> > AC_ARG_WITH([buildid],
> > AS_HELP_STRING([--with-buildid=id], [Set additional build version details]))
> > -AC_DEFINE_UNQUOTED([BUILDID], "$with_buildid", [Build version details])
> > +AC_DEFINE_UNQUOTED([BUILDID], "-$with_buildid", [Build version details])
> > if test "x$with_buildid" != x; then
> > AC_SUBST([BUILDID], "-$with_buildid")
>
> Isn't this line adding a second '-' to the BUILDID value ?
This will add a second '-' if there was already one in the value passed to
--with-buildid
Otherwise I think it's fine, AC_DEFINE_UNQUOTED will add a
#define BUILDID "-$buildid" to config.h, AC_SUBST will do a
sed "s/@BUILDID@/-$buildid/" so if $buildid does not contain a starting
'-', we'll be fine and get a single '-' in both cases.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140402/b189e1a7/attachment.sig>
More information about the virt-tools-list
mailing list