From 689d61925e75293969e073b8a315f686fd4f1ff1 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Wed, 31 Aug 2005 02:38:34 +0000 Subject: [PATCH] Detect pkgtools fakeroot feature and use it. This enables us to use host pkgtools to add packages to the isos instead of using the target pkgtools. This would fail with -Release building -Devel isos. --- nrelease/Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/nrelease/Makefile b/nrelease/Makefile index 6e19ea9034..a520461ad8 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/nrelease/Makefile,v 1.40 2005/08/23 21:33:29 cpressey Exp $ +# $DragonFly: src/nrelease/Makefile,v 1.41 2005/08/31 02:38:34 corecode Exp $ # ISODIR ?= /usr/release @@ -172,6 +172,21 @@ customizeiso: cp -R ${.CURDIR}/../etc/${UPGRADE_ITEM} ${ISOROOT}/etc/${UPGRADE_ITEM} .endfor +PKG_VERSTR!= pkg_info -vP +.if !empty(PKG_VERSTR:M*fakeroot*) + +pkgcleaniso: +.for PKG in ${REL_PACKAGES} + -PKG_FAKEROOT=${ISOROOT:Q} pkg_delete -f ${PKG} +.endfor + +pkgaddiso: +.for PKG in ${REL_PACKAGES} + -PKG_FAKEROOT=${ISOROOT:Q} pkg_add ${PACKAGES_LOC}/${PKG}.tgz +.endfor + +.else # pkgtools don't know fakeroot + pkgcleaniso: rm -f ${ISOROOT}/tmp/chrootscript echo "#!/bin/sh" > ${ISOROOT}/tmp/chrootscript @@ -203,6 +218,8 @@ pkgaddiso: rm -f ${ISOROOT}/tmp/${PKG}.tgz .endfor +.endif # pkgtools fakeroot + mklocatedb: ( find -s ${ISOROOT} -path ${ISOROOT}/tmp -or \ -path ${ISOROOT}/usr/tmp -or -path ${ISOROOT}/var/tmp \ -- 2.41.0