qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, thuth@redhat.com, berrange@redhat.com
Subject: [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too
Date: Sat, 27 May 2023 11:28:48 +0200	[thread overview]
Message-ID: <20230527092851.705884-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20230527092851.705884-1-pbonzini@redhat.com>

The behavior of --{enable,disable}-pypi is similar to that of
-Dwrapmode={default,nodownload} respectively.  In particular,
in both cases a feature needs to be explicitly enabled for the
dependency to be downloaded.

So, use a single option to control both cases.  Now, --enable-slirp
will trigger cloning and building of libslirp if the .pc file
is not found on the machine.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure              | 17 +++++++----------
 subprojects/.gitignore |  3 +++
 2 files changed, 10 insertions(+), 10 deletions(-)
 create mode 100644 subprojects/.gitignore

diff --git a/configure b/configure
index 370e038e63d7..2f908660e4f1 100755
--- a/configure
+++ b/configure
@@ -266,7 +266,7 @@ bsd_user=""
 plugins="$default_feature"
 ninja=""
 python=
-pypi="enabled"
+download="enabled"
 bindir="bin"
 skip_meson=no
 vfio_user_server="disabled"
@@ -756,9 +756,9 @@ for opt do
   --with-git-submodules=*)
       git_submodules_action="$optarg"
   ;;
-  --disable-pypi) pypi="disabled"
+  --disable-download) download="disabled"
   ;;
-  --enable-pypi) pypi="enabled"
+  --enable-download) download="enabled"
   ;;
   --enable-plugins) if test "$mingw32" = "yes"; then
                         error_exit "TCG plugins not currently supported on Windows platforms"
@@ -962,7 +962,7 @@ python="$(command -v "$python")"
 # - venv is allowed to use system packages;
 # - all setup can be performed offline;
 # - missing packages may be fetched from PyPI,
-#   unless --disable-pypi is passed.
+#   unless --disable-download is passed.
 # - pip is not installed into the venv when possible,
 #   but ensurepip is called as a fallback when necessary.
 
@@ -979,7 +979,7 @@ python="$python -B"
 mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
 
 mkvenv_flags=""
-if test "$pypi" = "enabled" ; then
+if test "$download" = "enabled" ; then
     mkvenv_flags="--online"
 fi
 
@@ -1002,7 +1002,7 @@ meson="$(cd pyvenv/bin; pwd)/meson"
 # Conditionally ensure Sphinx is installed.
 
 mkvenv_flags=""
-if test "$pypi" = "enabled" -a "$docs" = "enabled" ; then
+if test "$download" = "enabled" -a "$docs" = "enabled" ; then
     mkvenv_flags="--online"
 fi
 
@@ -1942,11 +1942,8 @@ if test "$skip_meson" = no; then
 
   rm -rf meson-private meson-info meson-logs
 
-  # Prevent meson from automatically downloading wrapped subprojects when missing.
-  # You can use 'meson subprojects download' before running configure.
-  meson_option_add "--wrap-mode=nodownload"
-
   # Built-in options
+  test "$download" = "disabled" && meson_option_add "--wrap-mode=nodownload"
   test "$bindir" != "bin" && meson_option_add "-Dbindir=$bindir"
   test "$default_feature" = no && meson_option_add -Dauto_features=disabled
   test "$static" = yes && meson_option_add -Dprefer_static=true
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
new file mode 100644
index 000000000000..7560ebb0b1a0
--- /dev/null
+++ b/subprojects/.gitignore
@@ -0,0 +1,3 @@
+/packagecache
+
+/slirp
-- 
2.40.1



  parent reply	other threads:[~2023-05-27  9:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-27  9:28 [PATCH 0/5] meson: replace submodules with wrap files Paolo Bonzini
2023-05-27  9:28 ` [PATCH 1/5] configure: remove --with-git= option Paolo Bonzini
2023-05-30 11:58   ` Thomas Huth
2023-05-30 12:03     ` Paolo Bonzini
2023-05-30 12:17       ` Daniel P. Berrangé
2023-05-30 12:18   ` Daniel P. Berrangé
2023-05-27  9:28 ` Paolo Bonzini [this message]
2023-05-27 16:49   ` [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too BALATON Zoltan
2023-05-27 19:18     ` Paolo Bonzini
2023-05-30 12:00   ` Thomas Huth
2023-05-27  9:28 ` [PATCH 3/5] meson: subprojects: replace submodules with wrap files Paolo Bonzini
2023-05-30 12:23   ` Daniel P. Berrangé
2023-05-30 12:51     ` Paolo Bonzini
2023-05-30 12:54       ` Daniel P. Berrangé
2023-05-27  9:28 ` [PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw Paolo Bonzini
2023-05-30 12:04   ` Thomas Huth
2023-05-30 12:53     ` Paolo Bonzini
2023-05-30 13:00       ` Thomas Huth
2023-05-27  9:28 ` [PATCH 5/5] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps Paolo Bonzini
2023-05-30 12:18 ` [PATCH 0/5] meson: replace submodules with wrap files Thomas Huth
2023-05-30 12:57   ` Daniel P. Berrangé
2023-05-30 13:22     ` Paolo Bonzini
2023-05-30 12:30 ` Daniel P. Berrangé
2023-05-30 12:47   ` Paolo Bonzini

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=20230527092851.705884-3-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).