]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/build.sh: Parse qemu version in more cases
authorJordan Justen <jordan.l.justen@intel.com>
Fri, 3 Feb 2017 21:10:39 +0000 (13:10 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Thu, 16 Mar 2017 21:31:18 +0000 (14:31 -0700)
commit2a5d278b59bea224e0f1c727ed8f80871feaed67
tree58827ec08e2e61bf9a4c99d93fe5649b77f2b92c
parentba8ea42738cf5caa8855c59da5359b8e7929568f
OvmfPkg/build.sh: Parse qemu version in more cases

Since qemu v2.7.0, the pkgversion appears to have a bug:

$ ./configure --target-list=x86_64-softmmu --with-pkgversion=foo

Results in this output:

$ x86_64-softmmu/qemu-system-x86_64 -version
QEMU emulator version 2.8.90(foo)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

This appears to have been introduced in:

67a1de0d19 Makefile: Derive "PKGVERSION" from "git describe" by default

The previous commit (077de81a4c) produces this output:

$ x86_64-softmmu/qemu-system-x86_64 -version
QEMU emulator version 2.6.50 (foo), Copyright (c) 2003-2008 Fabrice Bellard

Now the OvmfPkg/build.sh script uses grep with '-o' to return only the
matched text.

grep -E is also used with a simple regex to extract only the digits of
the version.

qemu-bug: https://bugs.launchpad.net/bugs/1673373

Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/build.sh