On Fri, Nov 6, 2026 at 4:19 PM Daniel P. Berrangé <[email protected]> wrote:
>
> On Thu, Nov 05, 2026 at 06:34:31PM +0000, Peter Maydell wrote:
> > On Thu, 5 Nov 2026 at 18:15, Yonggang Luo <[email protected]> wrote:
> > >
> > > configure_file() writes qemu-version.h at setup time. That result is
> > > not a ninja edge, so a missing header is never rebuilt and compiles
> > > that include it do not order on it. Generate the header with
> > > custom_target and list it in genh. scripts/qemu-version.py reads
> > > scripts/qemu-version.h.in and substitutes -version. An empty
> > > pkgversion drops the QEMU_PKGVERSION line.
> > >
> > > Link: 
> > > https://lore.kernel.org/qemu-devel/cafeaca8bgodxrfrzrimhgn1v2htcwvaprsyucemzbmuubvk...@mail.gmail.com/
> > >
> > > Signed-off-by: Yonggang Luo <[email protected]>
> >
> > If we're going back to having an external script, the other
> > way to fix this would be to just revert ab78ac76f44a12 and
> > maybe fc35f2438770, since their commit messages suggest the
> > main aim was to not have an external script.
>
> I'm not clear what problem there was with an external script that these
> were solving ? These also seem to have appeared in a pull request
> without any prior posting for review, which is rather shortcutting our
> normal dev process.
>
> Personally I'd suggest we revert and then simplify the version handling
> in a different way:
>
>  * Remove the VERSION file and put the number in meson.build directly
>  * Emit QEMU_PKGVERSION into build/config-host.h
>  * Remove qemu/version.h and build/qemu-version.h

Oh, yeah, we already have config-host.h good idea.
Seems better, so we just revert the previous commits? and goes this way?
Still have an issue, how to deal with the git version? because that's much more
dynamic. Reset to different git versions does not mean we need to re-configure.
So that when the git version changes, we have no need to reconfigure it at all.

>
> This avoids any need for rules to generate build/qemu-version.h
> and config-host.h already has logic to regenerate itself when
> meson.build changes.
>
> With regards,
> Daniel
> --
> |: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
> |: https://libvirt.org          ~~          https://entangle-photo.org :|
> |: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
>


-- 
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

Reply via email to