Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/usr.sbin/postinstall Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/2f7b4040c92b
branches:  netbsd-9
changeset: 1000893:2f7b4040c92b
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Sep 25 15:46:37 2019 +0000

description:
Pull up following revision(s) (requested by nakayama in ticket #240):

        usr.sbin/postinstall/postinstall.in: revision 1.6
        usr.sbin/postinstall/postinstall.in: revision 1.7

exclude_libs - redirect ls 2> /dev/null so that the user is not
spammed with errors for directories without any libraries; the most
common case in the wild would be empty /usr/libdata/debug.  Add -d to
ls for good measure while here.

 -

Add ${DEST_DIR} prefix to check target directory not host directory.

diffstat:

 usr.sbin/postinstall/postinstall.in |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 0108951bd3b6 -r 2f7b4040c92b usr.sbin/postinstall/postinstall.in
--- a/usr.sbin/postinstall/postinstall.in       Tue Sep 24 18:15:50 2019 +0000
+++ b/usr.sbin/postinstall/postinstall.in       Wed Sep 25 15:46:37 2019 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.5 2019/06/15 13:07:09 christos Exp $
+# $NetBSD: postinstall.in,v 1.5.2.1 2019/09/25 15:46:37 martin Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -591,7 +591,7 @@
 # from consideration for removal
 #
 exclude_libs() {
-       local target="$(ls -l lib*.so.* \
+       local target="$(ls -l -d lib*.so.* 2> /dev/null \
            | ${AWK} '{ print $11; }' \
            | ${SED} -e 's@.*/@@' | ${SORT} -u)"
        exclude -t ${target}
@@ -2254,7 +2254,7 @@
 getcompatlibdirs() {
        for i in $(getarchsubdirs); do
                echo $i 1>&2
-               if [ -d /usr/lib/$i ]; then
+               if [ -d "${DEST_DIR}/usr/lib/$i" ]; then
                        echo /usr/lib/$i
                fi
        done



Home | Main Index | Thread Index | Old Index