Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/postinstall Terminate the obsole directory walking ...
details: https://anonhg.NetBSD.org/src/rev/cff09457fb88
branches: trunk
changeset: 809259:cff09457fb88
user: martin <martin%NetBSD.org@localhost>
date: Sat Jun 27 09:56:54 2015 +0000
description:
Terminate the obsole directory walking loop when we hit "/" or "."
(both relative to DESTDIR), I have seen it run into an endless loop with
_path=. when invoked from the top level make with some (valid) args.
diffstat:
usr.sbin/postinstall/postinstall | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (20 lines):
diff -r 0256b9a62004 -r cff09457fb88 usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall Sat Jun 27 08:29:56 2015 +0000
+++ b/usr.sbin/postinstall/postinstall Sat Jun 27 09:56:54 2015 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: postinstall,v 1.191 2015/03/31 07:57:57 martin Exp $
+# $NetBSD: postinstall,v 1.192 2015/06/27 09:56:54 martin Exp $
#
# Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -500,7 +500,7 @@
_path="${1#.}"
[ -h "${DEST_DIR}${_path}" ] || \
[ -e "${DEST_DIR}${_path}" ] || return 1
- while [ "${_path}" != "/" ] ; do
+ while [ "${_path}" != "/" -a "${_path}" != "." ] ; do
_dirname="$(dirname "${_path}" 2>/dev/null)"
_basename="$(basename "${_path}" 2>/dev/null)"
ls -fa "${DEST_DIR}${_dirname}" 2> /dev/null \
Home |
Main Index |
Thread Index |
Old Index