Module Name: src
Committed By: martin
Date: Wed Sep 25 15:46:38 UTC 2019
Modified Files:
src/usr.sbin/postinstall [netbsd-9]: postinstall.in
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/usr.sbin/postinstall/postinstall.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/postinstall/postinstall.in
diff -u src/usr.sbin/postinstall/postinstall.in:1.5 src/usr.sbin/postinstall/postinstall.in:1.5.2.1
--- src/usr.sbin/postinstall/postinstall.in:1.5 Sat Jun 15 13:07:09 2019
+++ src/usr.sbin/postinstall/postinstall.in Wed Sep 25 15:46:37 2019
@@ -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 @@ exclude()
# 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 @@ getarchsubdirs() {
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