Module Name:    src
Committed By:   apb
Date:           Thu Apr 23 09:30:56 UTC 2009

Modified Files:
        src/distrib/sets: checkflist

Log Message:
Simplify the way EXCLUDE_REGEXP is built.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/checkflist

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/checkflist
diff -u src/distrib/sets/checkflist:1.33 src/distrib/sets/checkflist:1.34
--- src/distrib/sets/checkflist:1.33	Mon Sep 11 22:16:10 2006
+++ src/distrib/sets/checkflist	Thu Apr 23 09:30:56 2009
@@ -1,6 +1,6 @@
 #! /bin/sh --
 #
-#	$NetBSD: checkflist,v 1.33 2006/09/11 22:16:10 dbj Exp $
+#	$NetBSD: checkflist,v 1.34 2009/04/23 09:30:56 apb Exp $
 #
 # Verify output of makeflist against contents of ${DESTDIR} and ${metalog}.
 
@@ -71,17 +71,12 @@
 # Exceptions to flist checking (all begin with "./"):
 #
 # * ignore var/db/syspkg and its contents
-# * ignore ${metalog}
-# * ignore METALOG
+# * ignore METALOG and METALOG.*
 # * ignore etc/mtree/set.*
 #
 IGNORE_REGEXP="^\./var/db/syspkg(\$|/)"
-if [ -n "${metalog}" ]; then
-	ml="${metalog#${DESTDIR}/}"
-	ml2="METALOG"
-	IGNORE_REGEXP="${IGNORE_REGEXP}|^\./${ml}\$|^\./${ml2}\$"
-	IGNORE_REGEXP="${IGNORE_REGEXP}|^\./etc/mtree/set\.[a-z]*\$"
-fi
+IGNORE_REGEXP="${IGNORE_REGEXP}|^\./METALOG(\..*)?\$"
+IGNORE_REGEXP="${IGNORE_REGEXP}|^\./etc/mtree/set\.[a-z]*\$"
 
 #
 # Here would be a good place to add custom exceptions to flist checking.
@@ -93,6 +88,8 @@
 # * ${SDIR}/flist: files mentioned in flist;
 # * ${SDIR}/mlist: files mentioned in metalog;
 #
+# All three lists are filtered against ${IGNORE_REGEXP}.
+#
 ( cd "${DESTDIR}" && ${FIND} ${origin} \
 	\( -type d -o -type f -o -type l \) -print ) \
 	| ${SORT} -u | ${EGREP} -v -e "${IGNORE_REGEXP}" >"${SDIR}/files"

Reply via email to