WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Portability patch for tools/check

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Portability patch for tools/check
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Thu, 14 Dec 2006 17:16:07 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Dec 2006 09:16:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200612141647.19252.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200612141647.19252.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Thu, Dec 14, 2006 at 04:47:19PM +0100, Christoph Egger wrote:

> 
> Hi!
> 
> I did a little off-list discussion with Jan.
> 
> Attached is a patch, which makes the non-portable scripts in tools/check 
> portable.
> 
> Christoph
>
> [Snip]
>
> diff -r 360eb996fa38 tools/check/check_python_devel
> --- a/tools/check/check_python_devel  Wed Dec 13 16:13:26 2006 +0000
> +++ b/tools/check/check_python_devel  Thu Dec 14 15:46:50 2006 +0100
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/bin/sh
>  # CHECK-BUILD
>  
>  function error {
> @@ -7,10 +7,19 @@ function error {
>      exit 1
>  }
>  
> +RC=0
> +
>  python -c '
>  import os.path, sys
>  for p in sys.path:
>       if os.path.exists(p + "/config/Makefile"):
>               sys.exit(0)
>  sys.exit(1)
> -' || error
> +' || RC=1 
> +
> +if test ${RC} -ne 0; then
> +     echo
> +     echo " *** Check for python development environment FAILED"
> +fi
> +
> +exit ${RC}

So we now have an uncalled error function at the top of the script.  Is this
intentional?  What's non-portable about functions anyway?  POSIX.1 defines a
function definition syntax
(http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html).

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>