Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-17 Thread Theo Buehler
On Mon, Jul 17, 2017 at 02:14:26PM +0300, Vadim Zhukov wrote: > 2017-07-17 14:03 GMT+03:00 Klemens Nanni : > > On Mon, Jul 17, 2017 at 11:57:02AM +0300, Vadim Zhukov wrote: > >> > + for _liba in /usr/lib/lib{c,crypto}; do > >> > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sor

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-17 Thread Klemens Nanni
On Mon, Jul 17, 2017 at 02:14:26PM +0300, Vadim Zhukov wrote: > 2017-07-17 14:03 GMT+03:00 Klemens Nanni : > > On Mon, Jul 17, 2017 at 11:57:02AM +0300, Vadim Zhukov wrote: > >> > + for _liba in /usr/lib/lib{c,crypto}; do > >> > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sor

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-17 Thread Vadim Zhukov
2017-07-17 14:03 GMT+03:00 Klemens Nanni : > On Mon, Jul 17, 2017 at 11:57:02AM +0300, Vadim Zhukov wrote: >> > + for _liba in /usr/lib/lib{c,crypto}; do >> > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | >> > tail -1)" >> > done >> > + _libas=${_libas#

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-17 Thread Klemens Nanni
On Mon, Jul 17, 2017 at 11:57:02AM +0300, Vadim Zhukov wrote: > > + for _liba in /usr/lib/lib{c,crypto}; do > > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail > > -1)" > > done > > + _libas=${_libas# } > > > > # Remount read-write, if /usr/l

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-17 Thread Vadim Zhukov
2017-07-16 14:55 GMT+03:00 Klemens Nanni : > On Sun, Jul 16, 2017 at 10:26:25AM +, Robert Peichaer wrote: >> But I'd like to stay strict matching the filenames. >> >> + for _liba in /usr/lib/lib{c,crypto}; do >> + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail >> -

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-16 Thread Klemens Nanni
On Sun, Jul 16, 2017 at 11:55:09AM +, Robert Peichaer wrote: > To the contrary what my previous answer might indicate, I don't care > that much either. If you want to explicitely remove the blank, go for > it. Most problems I ever encountered while writing shell code were related to (nested) qu

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-16 Thread Robert Peichaer
On Sun, Jul 16, 2017 at 01:55:02PM +0200, Klemens Nanni wrote: > On Sun, Jul 16, 2017 at 10:26:25AM +, Robert Peichaer wrote: > > But I'd like to stay strict matching the filenames. > > > > + for _liba in /usr/lib/lib{c,crypto}; do > > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a |

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-16 Thread Robert Peichaer
On Sun, Jul 16, 2017 at 01:23:00PM +0200, Klemens Nanni wrote: > On Sun, Jul 16, 2017 at 10:26:25AM +, Robert Peichaer wrote: > > On Sun, Jul 16, 2017 at 03:37:15AM +0200, Klemens Nanni wrote: > > > Why looping over all existing archives, picking the latest version of > > > the current archive,

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-16 Thread Klemens Nanni
On Sun, Jul 16, 2017 at 10:26:25AM +, Robert Peichaer wrote: > But I'd like to stay strict matching the filenames. > > + for _liba in /usr/lib/lib{c,crypto}; do > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail -1)" > + done > > > + _libas=${_libas# } Agree

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-16 Thread Klemens Nanni
On Sun, Jul 16, 2017 at 10:26:25AM +, Robert Peichaer wrote: > On Sun, Jul 16, 2017 at 03:37:15AM +0200, Klemens Nanni wrote: > > Why looping over all existing archives, picking the latest version of > > the current archive, skipping it in case it's already in our list of > > selected latest ve

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-16 Thread Theo Buehler
> But I'd like to stay strict matching the filenames. > > + for _liba in /usr/lib/lib{c,crypto}; do > + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail -1)" > + done Yes, this is indeed better. So Klemens, can you write a patch that uses this and removes the then

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-16 Thread Robert Peichaer
On Sun, Jul 16, 2017 at 03:37:15AM +0200, Klemens Nanni wrote: > Why looping over all existing archives, picking the latest version of > the current archive, skipping it in case it's already in our list of > selected latest versions or adding it otherwise? > > The current code runs ls|sort|tail ab

Re: rc: reorder_libs: [2/2] Pick archive versions more efficiently

2017-07-15 Thread Theo Buehler
On Sun, Jul 16, 2017 at 03:37:15AM +0200, Klemens Nanni wrote: > Why looping over all existing archives, picking the latest version of > the current archive, skipping it in case it's already in our list of > selected latest versions or adding it otherwise? > > The current code runs ls|sort|tail ab