All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, marcandre.lureau@redhat.com
Subject: Re: [PATCH 2/2] meson: use subproject for keycodemapdb
Date: Thu, 18 May 2023 15:01:21 +0100	[thread overview]
Message-ID: <ZGYvsfw9k8s7wnPV@redhat.com> (raw)
In-Reply-To: <f8f06172-29fd-08ae-182e-193d139a878b@redhat.com>

On Thu, May 18, 2023 at 03:00:44PM +0200, Paolo Bonzini wrote:
> On 5/18/23 14:55, Daniel P. Berrangé wrote:
> > On Thu, May 18, 2023 at 02:46:45PM +0200, Paolo Bonzini wrote:
> > > By using a subproject, our own meson.build can use variables from
> > > the subproject instead of hard-coded paths.  In the future, it may
> > > also be possible to use wrap to download the submodule.
> > > 
> > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > > ---
> > >   .gitmodules                      | 4 ++--
> > >   configure                        | 4 ++--
> > >   scripts/archive-source.sh        | 2 +-
> > >   {ui => subprojects}/keycodemapdb | 0
> > >   ui/meson.build                   | 6 ++++--
> > >   5 files changed, 9 insertions(+), 7 deletions(-)
> > >   rename {ui => subprojects}/keycodemapdb (100%)
> > > 
> > > diff --git a/.gitmodules b/.gitmodules
> > > index 3ed5d073d630..f8b2ddf3877c 100644
> > > --- a/.gitmodules
> > > +++ b/.gitmodules
> > > @@ -25,8 +25,8 @@
> > >   [submodule "roms/QemuMacDrivers"]
> > >   	path = roms/QemuMacDrivers
> > >   	url = https://gitlab.com/qemu-project/QemuMacDrivers.git
> > > -[submodule "ui/keycodemapdb"]
> > > -	path = ui/keycodemapdb
> > > +[submodule "subprojects/keycodemapdb"]
> > > +	path = subprojects/keycodemapdb
> > >   	url = https://gitlab.com/qemu-project/keycodemapdb.git
> > >   [submodule "roms/seabios-hppa"]
> > >   	path = roms/seabios-hppa
> > > diff --git a/configure b/configure
> > > index 5bbca83d9a31..2b6995e16756 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -254,7 +254,7 @@ else
> > >       git_submodules_action="ignore"
> > >   fi
> > > -git_submodules="ui/keycodemapdb"
> > > +git_submodules="subprojects/keycodemapdb"
> > >   git="git"
> > >   debug_tcg="no"
> > >   docs="auto"
> > > @@ -806,7 +806,7 @@ case $git_submodules_action in
> > >           fi
> > >       ;;
> > >       ignore)
> > > -        if ! test -f "$source_path/ui/keycodemapdb/README"
> > > +        if ! test -f "$source_path/subprojects/keycodemapdb/README"
> > >           then
> > >               echo
> > >               echo "ERROR: missing GIT submodules"
> > > diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
> > > index b15f6fe6b8fe..a0a3153faa99 100755
> > > --- a/scripts/archive-source.sh
> > > +++ b/scripts/archive-source.sh
> > > @@ -26,7 +26,7 @@ sub_file="${sub_tdir}/submodule.tar"
> > >   # independent of what the developer currently has initialized
> > >   # in their checkout, because the build environment is completely
> > >   # different to the host OS.
> > > -submodules="subprojects/dtc meson ui/keycodemapdb"
> > > +submodules="subprojects/dtc meson subprojects/keycodemapdb"
> > >   submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
> > >   sub_deinit=""
> > > diff --git a/ui/keycodemapdb b/subprojects/keycodemapdb
> > > similarity index 100%
> > > rename from ui/keycodemapdb
> > > rename to subprojects/keycodemapdb
> > > diff --git a/ui/meson.build b/ui/meson.build
> > > index 330369707dd7..e24d52b89941 100644
> > > --- a/ui/meson.build
> > > +++ b/ui/meson.build
> > > @@ -162,13 +162,15 @@ keymaps = [
> > >   ]
> > >   if have_system or xkbcommon.found()
> > > +  keycodemapdb_proj = subproject('keycodemapdb', required: true)
> > > +  keymap_gen = find_program('keymap-gen', required: true)
> > 
> > This variable isn't used, is it ?
> 
> Hmm, no it isn't.  Do you prefer the code below and removing the assignment,
> or
> 
>     command: [python, keymap_gen.full_path(),
> 
> ?  find_program is nicer, but you have to peek with
> keycodemap_proj.get_variable() anyway to reach the CSV file, so...

I'm pretty ambivalent. If there's no functional reason to use
find_program, I guest we might as well stick with get_variable for
parity with the CSV file


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



      reply	other threads:[~2023-05-18 14:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 12:46 [PATCH 0/2] meson: use subprojects for bundled projects Paolo Bonzini
2023-05-18 12:46 ` [PATCH 1/2] meson: use subproject for internal libfdt Paolo Bonzini
2023-05-18 12:46 ` [PATCH 2/2] meson: use subproject for keycodemapdb Paolo Bonzini
2023-05-18 12:55   ` Daniel P. Berrangé
2023-05-18 13:00     ` Paolo Bonzini
2023-05-18 14:01       ` Daniel P. Berrangé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZGYvsfw9k8s7wnPV@redhat.com \
    --to=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.