Source-Changes-HG archive

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

[src/trunk]: src/distrib/sets Exit with a sensible error message if makeflist...



details:   https://anonhg.NetBSD.org/src/rev/0ab1bc871b10
branches:  trunk
changeset: 749583:0ab1bc871b10
user:      apb <apb%NetBSD.org@localhost>
date:      Thu Dec 03 12:44:57 2009 +0000

description:
Exit with a sensible error message if makeflist output is empty.
This should be better than an incomprehensible error message from
mtree.

diffstat:

 distrib/sets/maketars |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 6b5fea3b9d54 -r 0ab1bc871b10 distrib/sets/maketars
--- a/distrib/sets/maketars     Thu Dec 03 12:35:34 2009 +0000
+++ b/distrib/sets/maketars     Thu Dec 03 12:44:57 2009 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: maketars,v 1.70 2009/11/30 16:13:23 uebayasi Exp $
+# $NetBSD: maketars,v 1.71 2009/12/03 12:44:57 apb Exp $
 #
 # Make release tar files for some or all lists.  Usage:
 # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
@@ -161,6 +161,10 @@
        ${HOST_SH} "${setsdir}/makeflist" -a "${MACHINE_ARCH}" -m "${MACHINE}" \
            -s "${setsdir}" "${setname}" > "${SDIR}/flist.${setname}" \
            || exit 1
+       if ! [ -s "${SDIR}/flist.${setname}" ]; then
+               echo >&2 "makeflist output is empty for ${setname}"
+               exit 1
+       fi
        if [ -n "${metalog}" ]; then
                ${setfilesonly} && msg "Creating ${setlistdir}/set.${setname}"
                ${AWK} -f "${rundir}/getdirs.awk" "${SDIR}/flist.${setname}" \



Home | Main Index | Thread Index | Old Index