Module Name:    src
Committed By:   nakayama
Date:           Thu Apr 12 11:49:04 UTC 2018

Modified Files:
        src/distrib/sets: sets.subr

Log Message:
Handle compatdir first whether making obsolete lists or not, to
make obsolete lists including compat directory (eg. ./usr/lib/i386)
properly.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.184 src/distrib/sets/sets.subr

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.183 src/distrib/sets/sets.subr:1.184
--- src/distrib/sets/sets.subr:1.183	Thu Feb  8 03:27:50 2018
+++ src/distrib/sets/sets.subr	Thu Apr 12 11:49:04 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.183 2018/02/08 03:27:50 christos Exp $
+#	$NetBSD: sets.subr,v 1.184 2018/04/12 11:49:04 nakayama Exp $
 #
 
 #
@@ -180,7 +180,7 @@ SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.183 2018/02/08 03:27:50 christos Exp $
+# 	# $NetBSD: sets.subr,v 1.184 2018/04/12 11:49:04 nakayama Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -369,6 +369,13 @@ list_set_files()
 				if (kw == "obsolete")
 					haveobs = 1
 			}
+			if (iscompatdir) {
+				for (d in cpaths) {
+					if (cpaths[d] == $1 "/")
+						next
+				}
+				cpaths[ncpaths++] = $1 "/"
+			}
 			if (obsolete && ! haveobs)
 				next
 			if (!show)
@@ -392,11 +399,6 @@ list_set_files()
 				emitcompat[$1] = 1;
 				next
 			}
-			for (d in cpaths) {
-				if (cpaths[d] == $1 "/")
-					next
-			}
-			cpaths[ncpaths++] = $1 "/"
 			for (d in compatarchdirs) {
 				tmp = $0
 				xfile = $1 "/" compatarchdirs[d]

Reply via email to