summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/105/socket/1673373
blob: 88ee1a5f128c36a2c01552ebff4e83d1f3483642 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
socket: 0.959
other: 0.957
semantic: 0.948
mistranslation: 0.938
assembly: 0.937
device: 0.932
instruction: 0.930
vnc: 0.925
graphic: 0.920
boot: 0.916
network: 0.916
KVM: 0.898

qemu -version output is incorrect with configure --with-pkgversion

Since qemu v2.7.0, up to the current master
(1883ff34b540daacae948f493b0ba525edf5f642)
the pkgversion feature 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

On 16 March 2017 at 09:00, Jordan Justen <email address hidden> wrote:
> This appears to have regressed in 67a1de0d19.
>
> When the configure --with-pkgversion=foo option is used, the output
> from -version will look like:
>
> QEMU emulator version 2.8.90(foo)
> Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
>
> After this patch, it will be:
>
> QEMU emulator version 2.8.90 (foo)
> Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
>
> Cc: Paolo Bonzini <email address hidden>
> Cc: Fam Zheng <email address hidden>
> Fixes: https://bugs.launchpad.net/bugs/1673373
> Cc: <email address hidden>
> Signed-off-by: Jordan Justen <email address hidden>
> ---
>  Makefile  | 2 +-
>  configure | 2 +-
>  vl.c      | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 1c4c04f6f2..c9df119798 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -289,7 +289,7 @@ qemu-version.h: FORCE
>                         printf '"$(PKGVERSION)"\n'; \
>                 else \
>                         if test -d .git; then \
> -                               printf '" ('; \
> +                               printf '"('; \
>                                 git describe --match 'v*' 2>/dev/null | tr -d '\n'; \
>                                 if ! git diff-index --quiet HEAD &>/dev/null; then \
>                                         printf -- '-dirty'; \
> diff --git a/configure b/configure
> index 99d8bece70..e94b06b5fc 100755
> --- a/configure
> +++ b/configure
> @@ -1004,7 +1004,7 @@ for opt do
>    ;;
>    --disable-blobs) blobs="no"
>    ;;
> -  --with-pkgversion=*) pkgversion=" ($optarg)"
> +  --with-pkgversion=*) pkgversion="($optarg)"
>    ;;
>    --with-coroutine=*) coroutine="$optarg"
>    ;;
> diff --git a/vl.c b/vl.c
> index 0b4ed5241c..3e60e61905 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1904,7 +1904,7 @@ static void main_loop(void)
>
>  static void version(void)
>  {
> -    printf("QEMU emulator version " QEMU_VERSION QEMU_PKGVERSION "\n"
> +    printf("QEMU emulator version " QEMU_VERSION " " QEMU_PKGVERSION "\n"
>             QEMU_COPYRIGHT "\n");
>  }

This is not the only place where we assemble a string from
QEMU_VERSION QEMU_PKGVERSION, so if you want to change from the
original approach where QEMU_PKGVERSION had a space in it then
you need to change the other places too.

Also it looks like we return QEMU_PKGVERSION as part of the
QMP qmp_query_version() code, so we should check to see what
the expected behaviour there is regarding having the space
or not.

I think when I wrote those printfs I was expecting that
QEMU_PKGVERSION might be a "-something" kind of string,
and so did whoever wrote the commit log for 67a1de0d19.
However looking at git history it seems to have always been
a " (something)" format, so obviously some confusion here...

thanks
-- PMM


This should be fixed now in QEMU 2.12:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=7e563bfb8a5104ff0e