Patchwork Subject: [PATCH] Make python mandatory

login
register
mail settings
Submitter Sebastian Herbszt
Date Dec. 30, 2011, 11:59 p.m.
Message ID <1325289569$267@local>
Download mbox | patch
Permalink /patch/133704/
State New
Headers show

Comments

Sebastian Herbszt - Dec. 30, 2011, 11:59 p.m.
Make python mandatory.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
---
 configure |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
Peter Maydell - Dec. 31, 2011, 12:52 a.m.
On 30 December 2011 23:59, Sebastian Herbszt <herbszt@gmx.de> wrote:
> Make python mandatory.

> +if has $python; then
> +  :
> +else
> +  echo "Python not found. Use --python=/path/to/python"
> +  exit 1
>  fi
>
>  if test -z "$target_list" ; then

I know you've just removed the outer condition here, but
while we're fiddling with it, wouldn't
   if ! has "$python"; then
       echo "Python not found etc"
   fi

be better?

-- PMM
Sebastian Herbszt - Dec. 31, 2011, 1 a.m.
Peter Maydell wrote:
>On 30 December 2011 23:59, Sebastian Herbszt <herbszt@gmx.de> wrote:
>> Make python mandatory.
>>
>> +if has $python; then
>> + :
>> +else
>> + echo "Python not found. Use --python=/path/to/python"
>> + exit 1
>> fi
>>
>> if test -z "$target_list" ; then
>
> I know you've just removed the outer condition here, but
> while we're fiddling with it, wouldn't
>    if ! has "$python"; then
>        echo "Python not found etc"
>    fi
>
> be better?
> 
> -- PMM

I just restored it to the state it was before commit "guest agent: add --enable-guest-agent config option".
This check was added in commit "Let users select their pythons".

Sebastian

Patch

diff --git a/configure b/configure
index 640e815..6c2a1b4 100755
--- a/configure
+++ b/configure
@@ -1185,13 +1185,11 @@  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
+  :
+else
+  echo "Python not found. Use --python=/path/to/python"
+  exit 1
 fi
 
 if test -z "$target_list" ; then