Reorder execution in the 'packages' target so both userland

and kernel are staged before invoking the 'create-<foo>-packages'
targets.

Include PKG_VERSION value in the 'create-{world,kernel}-packages'
targets so the value is not redefined when packaging the kernel,
which otherwise results in inconsistent and confusing package
version results.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Glen Barber 2016-01-29 17:05:30 +00:00
parent c8296cbb96
commit d9b0aafdb6

View File

@ -1379,9 +1379,9 @@ packages: _pkgbootstrap
@mkdir -p ${WSTAGEDIR} ${KSTAGEDIR} ${REPODIR}
${_+_}@cd ${.CURDIR}; \
${MAKE} DESTDIR=${DESTDIR:U${WSTAGEDIR}} -DNO_ROOT -B stageworld ; \
${MAKE} DESTDIR=${DESTDIR:U${WSTAGEDIR}} create-world-packages ; \
${MAKE} DESTDIR=${DESTDIR:U${KSTAGEDIR}} -DNO_ROOT -B stagekernel ; \
${MAKE} DESTDIR=${DESTDIR:U${KSTAGEDIR}} DISTDIR=kernel create-kernel-packages
${MAKE} DESTDIR=${DESTDIR:U${WSTAGEDIR}} PKG_VERSION=${PKG_VERSION} create-world-packages ; \
${MAKE} DESTDIR=${DESTDIR:U${KSTAGEDIR}} PKG_VERSION=${PKG_VERSION} DISTDIR=kernel create-kernel-packages
create-world-packages: _pkgbootstrap
@rm -f ${DESTDIR}/*.plist 2>/dev/null || :