When building multiple kernels use [2..-1] to extract !INSTALLKERNEL

from BUILDKERNELS list.  This is more strict, since INSTALLKERNEL by
definition is the first word of BUILDKERNELS list.  The previous
code failed if INSTALLKERNEL is a substring of additional kernel name.

Reviewed by:	gjb
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
This commit is contained in:
glebius 2015-09-01 11:46:13 +00:00
parent 18228c73ff
commit 1f4d5a846e

View File

@ -1146,7 +1146,7 @@ distributekernel distributekernel.debug:
sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \
${DESTDIR}/${DISTDIR}/kernel.meta
.endif
.for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
.for _kernel in ${BUILDKERNELS:[2..-1]}
.if defined(NO_ROOT)
echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta
.endif
@ -1168,7 +1168,7 @@ packagekernel:
cd ${DESTDIR}/${DISTDIR}/kernel; \
tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \
${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz
.for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
.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
@ -1177,7 +1177,7 @@ packagekernel:
cd ${DESTDIR}/${DISTDIR}/kernel; \
tar cvf - . | \
${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz
.for _kernel in ${BUILDKERNELS:S/${INSTALLKERNEL}//}
.for _kernel in ${BUILDKERNELS:[2..-1]}
cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
tar cvf - . | \
${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz