Source-Changes-HG archive

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

[src/trunk]: src Do not try in postinstall(8) to replicate the code in etc/mt...



details:   https://anonhg.NetBSD.org/src/rev/966185d8de4d
branches:  trunk
changeset: 754215:966185d8de4d
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Apr 23 19:21:08 2010 +0000

description:
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.

diffstat:

 etc/mtree/Makefile               |  5 ++++-
 usr.sbin/postinstall/postinstall |  9 ++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diffs (44 lines):

diff -r 49288a9a670d -r 966185d8de4d etc/mtree/Makefile
--- a/etc/mtree/Makefile        Fri Apr 23 19:18:09 2010 +0000
+++ b/etc/mtree/Makefile        Fri Apr 23 19:21:08 2010 +0000
@@ -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=     -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
diff -r 49288a9a670d -r 966185d8de4d usr.sbin/postinstall/postinstall
--- a/usr.sbin/postinstall/postinstall  Fri Apr 23 19:18:09 2010 +0000
+++ b/usr.sbin/postinstall/postinstall  Fri Apr 23 19:21:08 2010 +0000
@@ -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 @@
        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



Home | Main Index | Thread Index | Old Index