Re: bootstrap breakage starting with fec7d87

Peter Rosin <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches,gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
On 2013-11-19 10:08, Ozkan Sezer wrote:
>> Starting with fec7d87 ("funclib.sh: simplify version comparison
>> functions") I am getting the following error from bootstrap:
>>
>> bootstrap:   error:   'makeinfo' version == 4.13 is too old
>> bootstrap:            'makeinfo' version >= 4.8 is required
>>
>> 9fd7b88 is fine.
>>
>> This is with Fedora 16, with grep-2.9-3.fc16.x86_64,
>> sed-4.2.1-9.fc16.x86_64, and bash-4.2.37-1.fc16.x86_64
>>
> 
> Will this be fixed anytime soon?

Yes, please.

I came up with this patch, but I don't know how portable it is, so I would
like someone knowledgeable to comment on it before pushing it...

Cheers,
Peter
0001-bootstrap-fix-version-sort.patch (text/x-patch, 875 B)
From a7462c5563e124e06f4f61ce2a9cea26cf8be390 Mon Sep 17 00:00:00 2001
From: Peter Rosin <[email protected]>
Date: Tue, 19 Nov 2013 11:54:27 +0100
Subject: [PATCH] bootstrap: fix version sort

Reported by Ozkan Sezer who suffered from makeinfo 4.13 being detected
as lesser than the required makeinfo 4.8.

* bootstrap (func_sort_ver): Sort numerically on the non-primary keys
as well.
---
 bootstrap |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bootstrap b/bootstrap
index 1b16d95..852efd5 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1323,7 +1323,7 @@ func_sort_ver ()
     $debug_cmd
 
     printf '%s\n%s\n' "$1" "$2" |
-    sort -t. -k1n -k1 -k2n -k2 -k3n -k3 -k4n -k4 -k5n -k5 -k6n -k6 -k7n -k7 -k8n -k8 -k9n -k9
+    sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
 }
 
 # func_lt_ver PREV CURR
-- 
1.7.9
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.