From fb92f9a7c481288b4504644aa03ecc095d9ad2b8 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 7 Mar 2008 20:29:24 +0000 Subject: [PATCH] Instead of copying packages into the ISO root, use mount_null. --- nrelease/Makefile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/nrelease/Makefile b/nrelease/Makefile index acad5dcf33..1a8a1cae24 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/nrelease/Makefile,v 1.75 2008/02/12 02:06:12 dillon Exp $ +# $DragonFly: src/nrelease/Makefile,v 1.76 2008/03/07 20:29:24 swildner Exp $ # ######################################################################### @@ -221,19 +221,17 @@ customizeiso: periodic/monthly/Makefile cp -R ${.CURDIR}/../etc/${UPGRADE_ITEM} ${ISOROOT}/etc/${UPGRADE_ITEM} .endfor - # This is a really bad hack. There seems to be no reliable way - # to install a package to a target directory prefix so we have to - # copy everything into the ISO root and do the install chrooted. + # There seems to be no reliable way to install a package to a target + # directory prefix so we mount_null our package directory into the + # ISO root and do the install chrooted. # - rm -rf ${ISOROOT}/tmp/packages mkdir ${ISOROOT}/tmp/packages -.for PKG in ${PKGSRC_PACKAGES} - cp ${PKGSRC_PKG_PATH}/${PKG} ${ISOROOT}/tmp/packages -.endfor + mount_null -o ro ${PKGSRC_PKG_PATH} ${ISOROOT}/tmp/packages .for PKG in ${PKGSRC_PACKAGES} ${ENVCMD} PKG_PATH=/tmp/packages chroot ${ISOROOT} ${PKGBIN_PKG_ADD} -I ${PKG} .endfor - rm -rf ${ISOROOT}/tmp/packages + umount ${ISOROOT}/tmp/packages + rmdir ${ISOROOT}/tmp/packages find ${ISOROOT}${PKGSRC_DB} -name +CONTENTS -type f -exec sed -i '' -e 's,${ISOROOT},,' -- {} \; chroot ${ISOROOT} ${PKGBIN_PKG_ADMIN} rebuild -- 2.41.0