From 0272b808cd70e35e40cac69d0b383e94d37cf4eb Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Tue, 19 Apr 2005 04:20:27 +0000 Subject: [PATCH] When installing packages into an ISO-image-to-be file tree: - Don't try to copy packages that already exist (with identical version numbers) on the image; and - Bail out early if an error (e.g. missing dependency) occurs, instead of blindly carrying on with the next package. --- nrelease/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/nrelease/Makefile b/nrelease/Makefile index e39b5d0f8c..d840f6c604 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -1,4 +1,4 @@ -# $DragonFly: src/nrelease/Makefile,v 1.33 2005/04/12 18:07:36 cpressey Exp $ +# $DragonFly: src/nrelease/Makefile,v 1.34 2005/04/19 04:20:27 cpressey Exp $ # ISODIR ?= /usr/release @@ -163,10 +163,16 @@ pkgaddiso: rm -f ${ISOROOT}/tmp/chrootscript echo "#!/bin/sh" > ${ISOROOT}/tmp/chrootscript .for PKG in ${REL_PACKAGES} - cp ${PACKAGES_LOC}/${PKG}.tgz ${ISOROOT}/tmp/${PKG}.tgz - echo "echo 'Installing package ${PKG}...'" >> ${ISOROOT}/tmp/chrootscript - echo "pkg_add /tmp/${PKG}.tgz" >> ${ISOROOT}/tmp/chrootscript + if [ ! -d ${ISOROOT}/var/db/pkg/${PKG} ]; then \ + cp ${PACKAGES_LOC}/${PKG}.tgz ${ISOROOT}/tmp/${PKG}.tgz; \ + echo "echo 'Installing package ${PKG}...' && \\" >> \ + ${ISOROOT}/tmp/chrootscript; \ + echo "pkg_add /tmp/${PKG}.tgz && \\" >> \ + ${ISOROOT}/tmp/chrootscript; \ + fi .endfor + echo "echo 'All packages added successfully!'" >> \ + ${ISOROOT}/tmp/chrootscript chmod a+x ${ISOROOT}/tmp/chrootscript chroot ${ISOROOT}/ /tmp/chrootscript rm ${ISOROOT}/tmp/chrootscript -- 2.41.0