Date: Wed, 2 Sep 2015 15:42:15 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287400 - head Message-ID: <201509021542.t82FgFVV085986@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Wed Sep 2 15:42:14 2015 New Revision: 287400 URL: https://svnweb.freebsd.org/changeset/base/287400 Log: The ${BUILDKERNELS:[2..-1]} appears to produce a non zero result for a one word variable, which is quite unexpected from documentation. So, to avoid double installation of a single kernel, protect the extra kernels loop with ${BUILDKERNELS:[#]} > 1 conditional. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Sep 2 15:23:51 2015 (r287399) +++ head/Makefile.inc1 Wed Sep 2 15:42:14 2015 (r287400) @@ -1127,6 +1127,7 @@ reinstallkernel reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--------------------------------------------------------------" @echo ">>> Installing kernel ${_kernel}" @@ -1135,6 +1136,7 @@ reinstallkernel reinstallkernel.debug: _ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME}.${_kernel} ${.TARGET:S/kernel//} .endfor +.endif distributekernel distributekernel.debug: .if empty(INSTALLKERNEL) @@ -1154,6 +1156,7 @@ distributekernel distributekernel.debug: sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \ ${DESTDIR}/${DISTDIR}/kernel.meta .endif +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} .if defined(NO_ROOT) echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta @@ -1170,27 +1173,32 @@ distributekernel distributekernel.debug: ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta .endif .endfor +.endif packagekernel: .if defined(NO_ROOT) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .endfor +.endif .else cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - . | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz +.if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - . | \ ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz .endfor .endif +.endif # # doxygen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509021542.t82FgFVV085986>