Source-Changes-HG archive

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

[src/trunk]: src/distrib/sets Use more functions. But still no functional ch...



details:   https://anonhg.NetBSD.org/src/rev/b945652896ca
branches:  trunk
changeset: 749835:b945652896ca
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Thu Dec 10 16:09:13 2009 +0000

description:
Use more functions.  But still no functional changes.

diffstat:

 distrib/sets/checkflist |  32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diffs (96 lines):

diff -r 766bfd4d33d7 -r b945652896ca distrib/sets/checkflist
--- a/distrib/sets/checkflist   Thu Dec 10 16:01:06 2009 +0000
+++ b/distrib/sets/checkflist   Thu Dec 10 16:09:13 2009 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh --
 #
-#      $NetBSD: checkflist,v 1.36 2009/12/10 16:01:06 uebayasi Exp $
+#      $NetBSD: checkflist,v 1.37 2009/12/10 16:09:13 uebayasi Exp $
 #
 # Verify output of makeflist against contents of ${DESTDIR} and ${metalog}.
 
@@ -145,7 +145,8 @@
 #
 # XXX: Temporarily disabled due to problems with obsolete files in metalog
 #
-if false && [ -n "${metalog}" ]; then
+compare_metalog()
+{
     generate_missing
     generate_extra
 
@@ -157,6 +158,12 @@
            [ -L "${DESTDIR}/${f}" ] || echo "$f"
     done < "${SDIR}/extra.all" > "${SDIR}/extra"
 
+    check_metalog_extra
+    check_metalog_missing
+}
+
+check_metalog_extra()
+{
     if [ -s "${SDIR}/extra" ]; then
        count="$(${AWK} 'END {print NR}' "${SDIR}/extra")"
        echo ""
@@ -169,7 +176,10 @@
        echo ""
        es=1 # this is fatal even if ${allowextra} is true
     fi
+}
 
+check_metalog_missing()
+{
     if [ -s "${SDIR}/missing" ]; then
        count="$(${AWK} 'END {print NR}' "${SDIR}/missing")"
        echo ""
@@ -182,11 +192,17 @@
        echo ""
        es=1 # this is fatal even if ${allowmissing} is true
     fi
+}
+
+if false && [ -n "${metalog}" ]; then
+       compare_metalog
 fi
 
 #
 # compare flist with DESTDIR, and report on differences.
 #
+compare_destdir()
+{
 generate_missing
 generate_extra
 
@@ -198,6 +214,12 @@
        [ -L "${DESTDIR}/${f}" ] || echo "$f"
 done < "${SDIR}/missing.all" > "${SDIR}/missing"
 
+check_destdir_extra
+check_destdir_missing
+}
+
+check_destdir_extra()
+{
 if [ -s "${SDIR}/extra" ]; then
        count="$(${AWK} 'END {print NR}' "${SDIR}/extra")"
        echo ""
@@ -214,7 +236,10 @@
        echo "=========  end of ${count} extra files  ==========="
        echo ""
 fi
+}
 
+check_destdir_missing()
+{
 if [ -s "${SDIR}/missing" ]; then
        count="$(${AWK} 'END {print NR}' "${SDIR}/missing")"
        echo ""
@@ -231,5 +256,8 @@
        echo "========  end of ${count} missing files  =========="
        echo ""
 fi
+}
+
+compare_destdir
 
 exit 0         # cleanup will exit with ${es}



Home | Main Index | Thread Index | Old Index