Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/common Deal with WORKSPECFILE not existing for many ...



details:   https://anonhg.NetBSD.org/src/rev/79b849d263b8
branches:  trunk
changeset: 338486:79b849d263b8
user:      martin <martin%NetBSD.org@localhost>
date:      Wed May 27 15:17:59 2015 +0000

description:
Deal with WORKSPECFILE not existing for many cd images

diffstat:

 distrib/common/Makefile.bootcd |  24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diffs (59 lines):

diff -r a02ce1fc19fa -r 79b849d263b8 distrib/common/Makefile.bootcd
--- a/distrib/common/Makefile.bootcd    Wed May 27 09:44:40 2015 +0000
+++ b/distrib/common/Makefile.bootcd    Wed May 27 15:17:59 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.bootcd,v 1.30 2015/05/27 09:44:40 martin Exp $
+#      $NetBSD: Makefile.bootcd,v 1.31 2015/05/27 15:17:59 martin Exp $
 #
 # Makefile snipped to create a CD/DVD ISO
 #
@@ -76,7 +76,7 @@
 
 .if ${MKUNPRIVED} == "no"
 CD_METALOG.unpriv=
-mtunpriv=""
+mtunpriv=
 .else
 CD_METALOG.unpriv=-M ${METALOG}.sanitised
 mtunpriv="-U"
@@ -95,7 +95,6 @@
 CDIMAGE=       NetBSD-${DISTRIBVER}-${CDBASE:S/cd$//}.iso
 .endif
 WORKSPEC=      fs.spec
-CDMAKEFSEXTRAOPTS+=-F ${WORKSPEC}
 
 CLEANFILES+=   ${CDIMAGE}
 CLEANFILES+=   bootxx.${MACHINE}
@@ -260,11 +259,16 @@
 image:
        @echo Preparing spec files for makefs...
        ${RM} -f ${WORKSPEC}
-       cat cdrom/etc/mtree/* |                                 \
-           ${TOOL_SED} -e 's/ size=[0-9]*//'                           \
-            -e '/^\.\/etc\/gettytab/d' > ${WORKSPEC}
-       ${HOST_SH} cdrom/dev/MAKEDEV -s all |                   \
-           ${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' >> ${WORKSPEC}
+       if [ -d cdrom/etc/mtree ]; then                         \
+               cat cdrom/etc/mtree/* |                         \
+                   ${TOOL_SED} -e 's/ size=[0-9]*//'           \
+                    -e '/^\.\/etc\/gettytab/d' > ${WORKSPEC};  \
+       fi
+       if [ -r cdrom/dev/MAKEDEV ]; then                       \
+               ${HOST_SH} cdrom/dev/MAKEDEV -s all |           \
+                   ${TOOL_SED} -e '/^\. type=dir/d'            \
+                       -e 's,^\.,./dev,' >> ${WORKSPEC};       \
+       fi
 .if defined(SPEC_IN)
        cat ${SPEC_IN} >> ${WORKSPEC}
 .endif
@@ -275,7 +279,9 @@
 .if defined(SPEC_EXTRA)
        cat ${SPEC_EXTRA} >> ${WORKSPEC}
 .endif
-       ${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
+       if [ -s ${WORKSPEC} ]; then specarg="-F ${WORKSPEC}"; fi;       \
+       ${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 $${specarg}     \
+               ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom
 
 .if ${CDRELEASE} == false
 release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post



Home | Main Index | Thread Index | Old Index