On Mon, Jul 17, 2017 at 03:00:34PM +0200, Klemens Nanni wrote:
> On Sun, Jul 16, 2017 at 09:09:44AM +0000, Robert Peichaer wrote:
> > The rationale to picking the library versions before remounting was
> > to keep the time window having rw /usr as small as possible.
> > If that's deemed ok, I'm too OK with switching the steps.
> Considering the fact that the now simplified version picking routine
> takes virtually no time, I'd like finish this up.
>
> Here's the updated diff checking r/w status beforehand.
ok
>
> Index: rc
> ===================================================================
> RCS file: /cvs/src/etc/rc,v
> retrieving revision 1.508
> diff -u -p -r1.508 rc
> --- rc 17 Jul 2017 12:02:53 -0000 1.508
> +++ rc 17 Jul 2017 12:56:07 -0000
> @@ -170,12 +170,6 @@ reorder_libs() {
>
> echo -n 'reordering libraries:'
>
> - # Only choose the latest version of the libraries.
> - 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/lib is on a read-only ffs filesystem.
> if [[ $_mp == *' type ffs '*'read-only'* ]]; then
> if mount -u -w $_dkdev; then
> @@ -185,6 +179,12 @@ reorder_libs() {
> return
> fi
> fi
> +
> + # Only choose the latest version of the libraries.
> + for _liba in /usr/lib/lib{c,crypto}; do
> + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail -1)"
> + done
> + _libas=${_libas# }
>
> for _liba in $_libas; do
> _tmpdir=$(mktemp -dq /tmp/_librebuild.XXXXXXXXXXXX) && (
>