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 2 of 2] Make tools/check scripts cross-friendly

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2 of 2] Make tools/check scripts cross-friendly
From: Aron Griffis <aron@xxxxxx>
Date: Mon, 21 Jan 2008 09:50:08 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 21 Jan 2008 06:52:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200801211205.42249.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: <735710fbd87c8c3701bb.1200715351@xxxxxxxxxxxxxx> <200801211205.42249.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
Christoph Egger wrote:  [Mon Jan 21 2008, 06:05:42AM EST]
> > diff -r 79cf8ffbc667 -r 735710fbd87c tools/check/check_udev
> > --- a/tools/check/check_udev        Fri Jan 18 22:59:53 2008 -0500
> > +++ b/tools/check/check_udev        Fri Jan 18 22:59:53 2008 -0500
> > @@ -1,34 +1,19 @@
> >  #!/bin/sh
> >  # CHECK-INSTALL
> >
> > -RC=0
> > +. funcs.sh
> >
> > -case ${OS} in
> > +case $OS in
> >  OpenBSD|NetBSD|FreeBSD)
> > -   TOOL="vnconfig"
> > -   which ${TOOL} 1>/dev/null 2>&1 || RC=1
> > +   has_or_fail vncconfig
>                             ^^^^^^
> Typo!!

Thanks, will fix and repost.

> > -if test "${OS}" = "SunOS"; then
> > +if [ "$OS" = "SunOS" ]; then
> 
> What does this fix?

I tried to make the scripts more consistently written while working on
them.

> Don't change this if you can't test on Solaris.

*shrug*

This works on every Bourne shell on every Solaris.  I'll change it
back if you want, but it's pointless.

> > +has_lib() {
> > +   check_sys_root || return 1
> > +
> > +   # subshell to prevent pollution of caller's environment
> > +   (
> > +   PATH=/sbin:$PATH        # for ldconfig
> > +
> > +   # This relatively common in a sys-root; libs are installed but
> > +   # ldconfig hasn't run there, so ldconfig -p won't work.  We can
> > +   # only fix it if it's writeable.
> > +   [ "$OS" != Linux ] || \
> > +   [ -f "$CROSS_SYS_ROOT/etc/ld.so.cache" ] || \
> > +   ldconfig -r "$CROSS_SYS_ROOT" && \
> > +   ldconfig -p ${CROSS_SYS_ROOT+-r "$CROSS_SYS_ROOT"} | grep -Fq "$1"
> > +   return $?
> > +   )
> > +}
> 
> This can be more readable with "if test" constructs.

Yeah, I wasn't very happy with that either.  I'll make it better,
thanks.

Aron

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