Patchwork [V2] Make python mandatory

login
register
mail settings
Submitter Sebastian Herbszt
Date Dec. 31, 2011, 11:14 a.m.
Message ID <1325330087$3142@local>
Download mbox | patch
Permalink /patch/133739/
State New
Headers show

Comments

Sebastian Herbszt - Dec. 31, 2011, 11:14 a.m.
Make python mandatory.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
---
 configure |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
Stefan Weil - Dec. 31, 2011, 11:20 a.m.
Am 31.12.2011 12:14, schrieb Sebastian Herbszt:
> Make python mandatory.
>
> Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
> ---
> configure | 10 +++-------
> 1 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/configure b/configure
> index 640e815..a54439d 100755
> --- a/configure
> +++ b/configure
> @@ -1185,13 +1185,9 @@ if test "$solaris" = "yes" ; then
> fi
> fi
>
> -if test "$guest_agent" != "no" ; then
> - if has $python; then
> - :
> - else
> - echo "Python not found. Use --python=/path/to/python"
> - exit 1
> - fi
> +if ! has $python; then
> + echo "Python not found. Use --python=/path/to/python"
> + exit 1
> fi
>
> if test -z "$target_list" ; then

Reviewed-by: Stefan Weil <sw@weilnetz.de>

Maybe this patch can be applied via qemu-trivial.

Regards,

Stefan Weil
Peter Maydell - Dec. 31, 2011, 11:39 a.m.
On 31 December 2011 11:14, Sebastian Herbszt <herbszt@gmx.de> wrote:
> +if ! has $python; then
> +  echo "Python not found. Use --python=/path/to/python"
> +  exit 1
>  fi

This will do the wrong thing if the user runs configure with
'--python=/path with spaces/python', but the Makefile won't
cope with that either so I guess it's not that important.

-- PMM
Stefan Hajnoczi - Jan. 3, 2012, 10:53 a.m.
On Sat, Dec 31, 2011 at 12:20:47PM +0100, Stefan Weil wrote:
> Am 31.12.2011 12:14, schrieb Sebastian Herbszt:
> >Make python mandatory.
> >
> >Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
> >---
> >configure | 10 +++-------
> >1 files changed, 3 insertions(+), 7 deletions(-)
> >
> >diff --git a/configure b/configure
> >index 640e815..a54439d 100755
> >--- a/configure
> >+++ b/configure
> >@@ -1185,13 +1185,9 @@ if test "$solaris" = "yes" ; then
> >fi
> >fi
> >
> >-if test "$guest_agent" != "no" ; then
> >- if has $python; then
> >- :
> >- else
> >- echo "Python not found. Use --python=/path/to/python"
> >- exit 1
> >- fi
> >+if ! has $python; then
> >+ echo "Python not found. Use --python=/path/to/python"
> >+ exit 1
> >fi
> >
> >if test -z "$target_list" ; then
> 
> Reviewed-by: Stefan Weil <sw@weilnetz.de>
> 
> Maybe this patch can be applied via qemu-trivial.

Thanks, applied to the trivial patches -next tree:

https://github.com/stefanha/qemu/tree/trivial-patches-next

Stefan

Patch

diff --git a/configure b/configure
index 640e815..a54439d 100755
--- a/configure
+++ b/configure
@@ -1185,13 +1185,9 @@  if test "$solaris" = "yes" ; then
   fi
 fi
 
-if test "$guest_agent" != "no" ; then
-  if has $python; then
-    :
-  else
-    echo "Python not found. Use --python=/path/to/python"
-    exit 1
-  fi
+if ! has $python; then
+  echo "Python not found. Use --python=/path/to/python"
+  exit 1
 fi
 
 if test -z "$target_list" ; then