Do not try in postinstall(8) to replicate the code in etc/mtree/Makefile
that assembles /etc/mtree/NetBSD.dist. Instead, use the Makefile's new target, emit_dist_file, to assemble the correct NetBSD.dist. Previously, 'postinstall -m amd64 -s $SRC_TOP' would install a NetBSD.dist that was missing /usr/lib/i386/ et cetera.
This commit is contained in:
parent
13f624ca0f
commit
ca088e5210
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.15 2010/01/18 10:25:29 plunky Exp $
|
||||
# $NetBSD: Makefile,v 1.16 2010/04/23 19:21:08 dyoung Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -39,6 +39,9 @@ TOOL_MTREE.unpriv=
|
|||
TOOL_MTREE.unpriv= -W
|
||||
.endif
|
||||
|
||||
emit_dist_file:
|
||||
${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}
|
||||
|
||||
distrib-dirs: .PHONY check_DESTDIR NetBSD.dist
|
||||
.if !defined(DISTRIBUTION_DONE) # {
|
||||
# Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: postinstall,v 1.107 2009/12/24 21:52:57 christos Exp $
|
||||
# $NetBSD: postinstall,v 1.108 2010/04/23 19:21:08 dyoung Exp $
|
||||
#
|
||||
# Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -933,12 +933,7 @@ do_mtree()
|
|||
if ! $SOURCEMODE; then
|
||||
MTREE_DIR="${SRC_DIR}/etc/mtree"
|
||||
else
|
||||
extrafile=/dev/null
|
||||
if [ "${MKX11}" != "no" ]; then
|
||||
get_makevar X11FLAVOUR
|
||||
extrafile="${SRC_DIR}/etc/mtree/NetBSD.dist.${X11FLAVOUR}"
|
||||
fi
|
||||
cat "${SRC_DIR}/etc/mtree/NetBSD.dist.base" "${extrafile}" > \
|
||||
${MAKE} -C ${SRC_DIR}/etc/mtree emit_dist_file > \
|
||||
"${SCRATCHDIR}/NetBSD.dist"
|
||||
MTREE_DIR="${SCRATCHDIR}"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue