Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] Re: (PR#12560) autogen.sh is inflexible when selecting ins
Home

[Freeciv-Dev] Re: (PR#12560) autogen.sh is inflexible when selecting ins

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sini.ruohomaa@xxxxxx
Subject: [Freeciv-Dev] Re: (PR#12560) autogen.sh is inflexible when selecting installed
From: "Marko Lindqvist" <cazfi74@xxxxxxxxx>
Date: Fri, 21 Jul 2006 06:46:54 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12560 >

Tommi Björkbacka wrote:
> 
> Here is a new version of autogen patch. It has couple of bugs fixed
> that were in previous version. There are still bugs/problems left. For
> example, autogen doesn't handle broken tools correctly and error
> messages in those situations aren't very helpful.

  Even with those problems this is improvement over current situation. 
So I may commit this to trunk. Once you fix remaining bugs, that is. 
Seems that I missed one in last attempt.


> +  s_pkg_major=0
> +  s_pkg_minor=0
> +  new_pkg=
> +  
> +  for SEARCHDIR ; do
> +    for MATCHSTUFF in `ls "$SEARCHDIR/$SPACKAGE-"* 2> /dev/null` ; do
> +      for FOUNDPKG in $MATCHSTUFF; do 
> +        # parse version information from name
> +        new_s_pkg_major=`echo $FOUNDPKG | cut -s -d- -f2 | cut -s -d. -f1`
> +        new_s_pkg_minor=`echo $FOUNDPKG | cut -s -d- -f2 | cut -s -d. -f2`
> +
> +        CORRECT=
> +        # check if version numbers are integers
> +        [ ! "x$new_s_pkg_major" = "x" ] && \
> +        [ "x`echo $new_s_pkg_major | sed s/[0-9]*//g`" = "x" ] && \
> +        [ ! "x$new_s_pkg_minor" = "x" ] && \
> +        [ "x`echo $new_s_pkg_minor | sed s/[0-9]*//g`" = "x" ] && \
> +        CORRECT=1
> +
> +        if [ ! -z $CORRECT ]; then        
> +          if [ "$new_s_pkg_major" -gt "$s_pkg_major" ]; then
> +            new_pkg="$FOUNDPKG"

  You should set s_pkg_major and s_pkg_minor here, I think.

> +          elif [ "$new_s_pkg_major" -eq "$s_pkg_major" ]; then
> +            if [ "$new_s_pkg_minor" -gt "$s_pkg_minor" ]; then
> +              new_pkg="$FOUNDPKG"

  Same here.



  - ML





[Prev in Thread] Current Thread [Next in Thread]