[virt-tools-list] [virt-viewer v2] build-sys: Always prepend '-' to build id

Christophe Fergeau cfergeau at redhat.com
Wed Apr 2 12:09:43 UTC 2014

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

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

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
Changes since v1:
  - don't set BUILDID to '-' when --with-buildid is not used

 configure.ac              | 9 +++++----
 mingw-virt-viewer.spec.in | 2 +-
 virt-viewer.spec.in       | 2 +-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7a00bf4..f966688 100644
--- a/configure.ac
+++ b/configure.ac
@@ -211,10 +211,11 @@ if test "x$have_gtk_vnc" != "xyes" && test "x$have_spice_gtk" != "xyes"; then
-    AS_HELP_STRING([--with-buildid=id], [Set additional build version details]))
-AC_DEFINE_UNQUOTED([BUILDID], "$with_buildid", [Build version details])
-if test "x$with_buildid" != x; then
-    AC_SUBST([BUILDID], "-$with_buildid")
+    AS_HELP_STRING([--with-buildid=id], [Set additional build version details]),
+    [buildid="-$with_buildid"], [buildid=""])
+AC_DEFINE_UNQUOTED([BUILDID], "$buildid", [Build version details])
+if test "x$buildid" != x; then
+    AC_SUBST([BUILDID], "$buildid")
 major=`echo $PACKAGE_VERSION | cut -d. -f1`
diff --git a/mingw-virt-viewer.spec.in b/mingw-virt-viewer.spec.in
index 44d9230..fb1c9fd 100644
--- a/mingw-virt-viewer.spec.in
+++ b/mingw-virt-viewer.spec.in
@@ -85,7 +85,7 @@ MinGW Windows virt-viewer MSI
-%mingw_configure --with-gtk=2.0 --with-buildid=-%{release}
+%mingw_configure --with-gtk=2.0 --with-buildid=%{release}
 %mingw_make %{?_smp_mflags} V=1
 %mingw_make %{?_smp_mflags} V=1 -C data msi
diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in
index 6b2d86b..b3b6b5e 100644
--- a/virt-viewer.spec.in
+++ b/virt-viewer.spec.in
@@ -104,7 +104,7 @@ autoreconf -if
 %define govirt_arg --with-ovirt
-%configure %{spice_arg} %{gtk_arg} %{govirt_arg} --with-buildid=-%{release} --disable-update-mimedb
+%configure %{spice_arg} %{gtk_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
 %__make %{?_smp_mflags}

More information about the virt-tools-list mailing list