On Mon, 2009-02-16 at 20:17 +0530, Subrata Modak wrote:
> Signed-Off-By: Subrata Modak <[email protected]>

Perhaps it would be better to look for apt/yum/smart/whatnot, attempt to
update the distro-"native" packages, and re-test the version number
before installing from a raw source tarball.

Of course that means this script has to keep code describing which
version of which distro used which tool with which package name(s). This
kind of supports Garret Cooper's point...

More comments interleaved below.

Cheers,
        -Matt Helsley

> --
> 
> diff -uprN ltp-full-20090131.orig/install-required-packages.sh 
> ltp-full-20090131/install-required-packages.sh
> --- ltp-full-20090131.orig/install-required-packages.sh       1970-01-01 
> 05:30:00.000000000 +0530
> +++ ltp-full-20090131/install-required-packages.sh    2009-02-16 
> 17:13:42.000000000 +0530
> @@ -0,0 +1,97 @@
> +#!/bin/sh
> +################################################################################
> +##                                                                           
>  ##
> +## Copyright (c) International Business Machines  Corp., 2009                
>  ##
> +##                                                                           
>  ##
> +## This program is free software;  you can redistribute it and#or modify     
>  ##
> +## it under the terms of the GNU General Public License as published by      
>  ##
> +## the Free Software Foundation; either version 2 of the License, or         
>  ##
> +## (at your option) any later version.                                       
>  ##
> +##                                                                           
>  ##
> +## This program is distributed in the hope that it will be useful, but       
>  ##
> +## WITHOUT ANY WARRANTY; without even the implied warranty of 
> MERCHANTABILITY ##
> +## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License  
>  ##
> +## for more details.                                                         
>  ##
> +##                                                                           
>  ##
> +## You should have received a copy of the GNU General Public License         
>  ##
> +## along with this program;  if not, write to the Free Software              
>  ##
> +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA   
>  ##
> +##                                                                           
>  ##
> +################################################################################
> +
> +
> +if [ $UID -ne 0 ]; then
> +        echo "You need to be root to install these packages"
> +        exit 1
> +fi
> +
> +pwd=`echo $PWD`
> +cd /tmp/
> +
> +which wget
> +if [ $? -eq 1 ]; then
> +        echo "...wget... not available on your system. Cannot download and 
> install LTP Pre-requisite packages"
> +        exit 0
> +fi
> +
> +m4 --version | grep 1.4.12
> +if [ $? -eq 0 ]; then

Checking for version equality seems like it would cause LTP to install
its own autotools toolchain most of the time -- even if suitable
versions >= 1.4.12 are already available.

> +        echo "m4-1.4.12 is already installed in the system. Skipping to 
> download this....."
> +else
> +          echo "Starting to Install m4-1.4.12 on your system.....";
> +          wget -c http://ftp.gnu.org/gnu/m4/m4-1.4.12.tar.bz2;

Why is this one using http but the rest are using ftp? Would using http
enable more LTP users behind typical firewalls?
 
> +          if [ $? -ne 0 ]
> +          then
> +               echo "Problem getting m4-1.4.12 package from Internet. 
> Skipping to install other Packages....."
> +               exit 1
> +          fi
> +          tar -xjf m4-1.4.12.tar.bz2
> +          (cd m4-1.4.12 && ./configure && make && make install)

I suppose the default for these will be a /usr/local prefix. Should we
assume that's OK or should this script also take all the common options
that a configure script does? I ask because it also seems like it would
often be appropriate to share the prefixes/(lib|include)dirs with these
tools since they're being installed for LTP.

Cheers,
        -Matt Helsley


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to