From c62615c02039cd33d7b58247e0474c8cc4f540e0 Mon Sep 17 00:00:00 2001 From: apb Date: Sat, 11 Apr 2009 15:09:32 +0000 Subject: [PATCH] In various places that manipulate mtree specs, use "mtree -CS" to sort. Remove some now-redundant standalone sort commands. --- distrib/sets/Makefile | 4 ++-- distrib/sets/makesrctars | 4 ++-- distrib/sets/maketars | 9 ++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/distrib/sets/Makefile b/distrib/sets/Makefile index 61cbe0ad49ce..6f0c73dd0716 100644 --- a/distrib/sets/Makefile +++ b/distrib/sets/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.65 2008/11/13 20:40:11 apb Exp $ +# $NetBSD: Makefile,v 1.66 2009/04/11 15:09:32 apb Exp $ # The `all' target must appear before bsd.own.mk is pulled in. all: @@ -89,7 +89,7 @@ ${METALOG.sanitised}: ${METALOG} ( cat ${NETBSDSRCDIR}/etc/mtree/NetBSD.dist ; \ echo '/unset all' ; \ cat ${METALOG} ) \ - | ${TOOL_MTREE} -C -k all -N ${NETBSDSRCDIR}/etc > ${METALOG}.new && \ + | ${TOOL_MTREE} -CS -k all -N ${NETBSDSRCDIR}/etc > ${METALOG}.new && \ ( rm -f ${METALOG} ; \ mv ${METALOG}.new ${METALOG} ) cat ${METALOG} | ${GREP} -v " optional" > ${.TARGET} diff --git a/distrib/sets/makesrctars b/distrib/sets/makesrctars index a995d2a5788c..7241d157622a 100755 --- a/distrib/sets/makesrctars +++ b/distrib/sets/makesrctars @@ -1,6 +1,6 @@ #! /bin/sh # -# $NetBSD: makesrctars,v 1.35 2009/04/03 22:36:35 perry Exp $ +# $NetBSD: makesrctars,v 1.36 2009/04/11 15:09:32 apb Exp $ # # makesrctars srcdir setdir # Create source tarballs in setdir from the source under srcdir. @@ -87,7 +87,7 @@ makeset() egrep='.' fi set -f - ${MTREE} -c -X "${intmp}" | ${MTREE} -C -k type | \ + ${MTREE} -c -X "${intmp}" | ${MTREE} -CS -k type | \ ${EGREP} -v 'type=link' | ${EGREP} ${egrep} | \ ${SED} -e 's:type=file:& mode=0664:' \ -e 's:type=dir:& mode=0775:' \ diff --git a/distrib/sets/maketars b/distrib/sets/maketars index fd5aa482e0c2..62babbf86e32 100755 --- a/distrib/sets/maketars +++ b/distrib/sets/maketars @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: maketars,v 1.67 2009/04/03 22:36:35 perry Exp $ +# $NetBSD: maketars,v 1.68 2009/04/11 15:09:32 apb Exp $ # # Make release tar files for some or all lists. Usage: # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir] @@ -144,14 +144,13 @@ for setname in ${lists}; do if [ -n "${metalog}" ]; then ${setfilesonly} && msg "Creating ${setlistdir}/set.${setname}" ${AWK} -f "${rundir}/getdirs.awk" "${SDIR}/flist.${setname}" \ - | ${SORT} -u > "${SDIR}/flist.${setname}.full" + > "${SDIR}/flist.${setname}.full" ( echo "/set uname=root gname=wheel" ${AWK} -f "${rundir}/join.awk" \ - "${SDIR}/flist.${setname}.full" "${metalog}" \ - | ${SORT} -u + "${SDIR}/flist.${setname}.full" "${metalog}" echo "./etc/mtree/set.${setname} type=file mode=0444" - ) | ${MTREE} -C -k all -R time -N "${etcdir}" \ + ) | ${MTREE} -CS -k all -R time -N "${etcdir}" \ > "${setlistdir}/set.${setname}" # We deliberately do not add set.${setname} to ${metalog}, # because we depend on it as an input.