nrelease - Unconditionally rm -rf /usr/release/root
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 22 Mar 2010 20:08:40 +0000 (13:08 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 22 Mar 2010 20:08:40 +0000 (13:08 -0700)
* rm -rf /usr/release/root even for quick nrelease builds to prevent
  stuff from an img build getting into an iso build.

nrelease/Makefile

index 73a9417..40c78f1 100644 (file)
@@ -245,8 +245,14 @@ buildkernel1 buildkernel2:
 # MAKEOBJDIRPREFIX for targets that are not run through the buildworld and 
 # buildkernel mechanism.
 #
+# Unconditionally clean out /usr/release/root so a previous img build
+# does not blow up a future quick iso build
+#
 buildiso:
-       if [ ! -d ${ISOROOT} ]; then mkdir -p ${ISOROOT}; fi
+       -rm -rf ${ISOROOT}
+       -chflags -R noschg ${ISOROOT}
+       rm -rf ${ISOROOT}
+       mkdir -p ${ISOROOT}
        if [ ! -d ${NRLOBJDIR}/nrelease ]; then mkdir -p ${NRLOBJDIR}/nrelease; fi
        ( cd ${.CURDIR}/..; make -DWANT_INSTALLER DESTDIR=${ISOROOT} installworld )
        ( cd ${.CURDIR}/../etc; MAKEOBJDIRPREFIX=${NRLOBJDIR}/nrelease \