Revert back to installing packages from a chroot.
authorSascha Wildner <saw@online.de>
Fri, 9 Jan 2009 18:29:28 +0000 (18:29 +0000)
committerSascha Wildner <saw@online.de>
Fri, 9 Jan 2009 18:30:26 +0000 (18:30 +0000)
Also, remove the -I option which prevented the package install scripts
from being run. This is important for the LiveDVD to properly build.

nrelease/Makefile

index cc64435..f17b353 100644 (file)
@@ -291,16 +291,19 @@ customizeiso:
                     periodic/monthly/Makefile
        cp -R ${.CURDIR}/../etc/${UPGRADE_ITEM} ${ISOROOT}/etc/${UPGRADE_ITEM}
 .endfor
+       # 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.
+       #
+       mkdir ${ISOROOT}/tmp/packages
+       mount_null -o ro ${PKGSRC_PKG_PATH} ${ISOROOT}/tmp/packages
 .for PKG in ${PKGSRC_PACKAGES}
-       ${ENVCMD} PKG_PATH=${PKGSRC_PKG_PATH} ${PKGBIN_PKG_ADD} -I -K ${ISOROOT}${PKGSRC_DB} -p ${ISOROOT}${PKGSRC_PREFIX} ${PKG}
+       ${ENVCMD} PKG_PATH=/tmp/packages chroot ${ISOROOT} ${PKGBIN_PKG_ADD} ${PKG}
 .endfor
+       umount ${ISOROOT}/tmp/packages
+       rmdir ${ISOROOT}/tmp/packages
        find ${ISOROOT}${PKGSRC_DB} -name +CONTENTS -type f -exec sed -i '' -e 's,${ISOROOT},,' -- {} \;
-       ${PKGBIN_PKG_ADMIN} -K ${ISOROOT}${PKGSRC_DB} rebuild
-.if defined(WITH_GUI)
-.for FONT in 75dpi 100dpi misc Type1 TTF
-       chroot ${ISOROOT} /usr/pkg/bin/mkfontdir /usr/pkg/lib/X11/fonts/${FONT}
-.endfor
-.endif
+       chroot ${ISOROOT} ${PKGBIN_PKG_ADMIN} rebuild
        makewhatis ${ISOROOT}/usr/local/man
        makewhatis ${ISOROOT}/usr/pkg/man
 
@@ -351,6 +354,7 @@ mkimg:
 .endif
 
 clean:
+       -umount ${ISOROOT}/tmp/packages
        if [ -d ${ISOROOT} ]; then chflags -R noschg ${ISOROOT}; fi
        if [ -d ${ISOROOT} ]; then rm -rf ${ISOROOT}/*; fi
        if [ -d ${NRLOBJDIR}/nrelease ]; then rm -rf ${NRLOBJDIR}/nrelease; fi