From c5d5093431b76184da9416354b420b3fec37cb9c Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 16 Nov 2012 18:40:20 +0100 Subject: [PATCH] libapse.lib: fix some version comparison errors by specifying numbers base How to reproduce: /usr/bin/autospec -u ocre -a1,2 Errors fixed: /usr/share/autospec/lib/libapse.lib: line 159: 019: value too great for base (error token is "019") /usr/share/autospec/lib/libapse.lib: line 162: 019: value too great for base (error token is "019") --- ChangeLog | 4 ++++ lib/libapse.lib.in | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 181dba9..3554f8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ Changes in version 1.14.3 --- Nov -- 2012 Davide Madrisan ++ bugfix + * lib/libapse.lib - Silvan Calarco: + Fix some version comparison errors by specifying numbers base. + + bugfix * autospec - Davide Madrisan: Fix parsing of multi-string arguments. diff --git a/lib/libapse.lib.in b/lib/libapse.lib.in index f611294..e6cde48 100644 --- a/lib/libapse.lib.in +++ b/lib/libapse.lib.in @@ -156,10 +156,10 @@ $FUNCNAME: \`$code2' has position ${version2[$i]} in precedence" $FUNCNAME: \`$code1' has position ${version1[$i]} in precedence" fi - if [[ ${version2[$i]} -gt ${version1[$i]} ]]; then + if [[ 10#${version2[$i]} -gt 10#${version1[$i]} ]]; then retval=2 break - elif [[ ${version2[$i]} -lt ${version1[$i]} ]]; then + elif [[ 10#${version2[$i]} -lt 10#${version1[$i]} ]]; then retval=1 break elif [ "${version2[$i]}" = "8" ]; then