svn commit: r278463 - head/sys/conf
Warner Losh
imp at FreeBSD.org
Mon Feb 9 16:29:46 UTC 2015
Author: imp
Date: Mon Feb 9 16:29:44 2015
New Revision: 278463
URL: https://svnweb.freebsd.org/changeset/base/278463
Log:
Prefer install over mkdir to create the directory. Add test to ensure
the directory doesn't exist before creating it. This makes the NO_ROOT
case actually work.
Suggested by: brooks@
Modified:
head/sys/conf/dtb.mk
Modified: head/sys/conf/dtb.mk
==============================================================================
--- head/sys/conf/dtb.mk Mon Feb 9 16:21:49 2015 (r278462)
+++ head/sys/conf/dtb.mk Mon Feb 9 16:29:44 2015 (r278463)
@@ -64,9 +64,9 @@ realinstall: _dtbinstall
.ORDER: beforeinstall _kmodinstall
_dtbinstall:
# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree
-# to make sure the tree is setup properly. This may break ownership of ${DTBDIR}
-# for no-root build.
- mkdir -p ${DESTDIR}${DTBDIR}
+# to make sure the tree is setup properly. We don't recreate it to avoid duplicate
+# entries in the NO_ROOT case.
+ test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}
.for _dtb in ${DTB}
${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \
${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}
More information about the svn-src-all
mailing list