[PATCH 13/30] configure: remove backwards-compatibility code

Paolo Bonzini posted 30 patches 3 years ago
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Michael Roth <michael.roth@amd.com>, Konstantin Kostiuk <kkostiuk@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Richard Henderson <richard.henderson@linaro.org>
[PATCH 13/30] configure: remove backwards-compatibility code
Posted by Paolo Bonzini 3 years ago
The cmd_line.txt mangling is only needed when rebuilding from very old
trees and is kept mostly as an example of how to extend it.  However,
Meson 0.63 introduces a deprecation mechanism for meson_options.txt
that can be used instead, so get rid of our home-grown hack.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/configure b/configure
index 6efc2055ce09..113db838a16f 100755
--- a/configure
+++ b/configure
@@ -2556,16 +2556,6 @@ if test "$skip_meson" = no; then
   if test "$?" -ne 0 ; then
       error_exit "meson setup failed"
   fi
-else
-  if test -f meson-private/cmd_line.txt; then
-    # Adjust old command line options whose type was changed
-    # Avoids having to use "setup --wipe" when Meson is upgraded
-    perl -i -ne '
-      s/^gettext = true$/gettext = auto/;
-      s/^gettext = false$/gettext = disabled/;
-      /^b_staticpic/ && next;
-      print;' meson-private/cmd_line.txt
-  fi
 fi
 
 # Save the configure command line for later reuse.
-- 
2.38.1
Re: [PATCH 13/30] configure: remove backwards-compatibility code
Posted by Marc-André Lureau 3 years ago
Hi

On Fri, Dec 9, 2022 at 3:28 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The cmd_line.txt mangling is only needed when rebuilding from very old
> trees and is kept mostly as an example of how to extend it.  However,
> Meson 0.63 introduces a deprecation mechanism for meson_options.txt
> that can be used instead, so get rid of our home-grown hack.

For the curious
https://mesonbuild.com/Release-notes-for-0-63-0.html#deprecate-an-option-and-replace-it-with-a-new-one

>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  configure | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/configure b/configure
> index 6efc2055ce09..113db838a16f 100755
> --- a/configure
> +++ b/configure
> @@ -2556,16 +2556,6 @@ if test "$skip_meson" = no; then
>    if test "$?" -ne 0 ; then
>        error_exit "meson setup failed"
>    fi
> -else
> -  if test -f meson-private/cmd_line.txt; then
> -    # Adjust old command line options whose type was changed
> -    # Avoids having to use "setup --wipe" when Meson is upgraded
> -    perl -i -ne '
> -      s/^gettext = true$/gettext = auto/;
> -      s/^gettext = false$/gettext = disabled/;
> -      /^b_staticpic/ && next;
> -      print;' meson-private/cmd_line.txt
> -  fi
>  fi

It's unlikely that users will jump directly from those old versions to
this, so it's fine to me if don't handle adjustments in that case.

>
>  # Save the configure command line for later reuse.
> --
> 2.38.1
>
>


-- 
Marc-André Lureau