Module Name:    src
Committed By:   martin
Date:           Wed May 27 09:26:46 UTC 2015

Modified Files:
        src/distrib/sets: maketars

Log Message:
Instead of guessing wether to preserve permissions on install operations
from the METALOG variable, default them to yes and add a new argument -U to
switch preservation off.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/maketars

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/maketars
diff -u src/distrib/sets/maketars:1.82 src/distrib/sets/maketars:1.83
--- src/distrib/sets/maketars:1.82	Tue May 26 15:46:01 2015
+++ src/distrib/sets/maketars	Wed May 27 09:26:46 2015
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-# $NetBSD: maketars,v 1.82 2015/05/26 15:46:01 martin Exp $
+# $NetBSD: maketars,v 1.83 2015/05/27 09:26:46 martin Exp $
 #
 # Make release tar files for some or all lists.  Usage:
 # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir]
 #	[-M metalog] [-N etcdir] [-F setlistsdir] [-d destdir]
-#	[-t tardir] [setname ...]
+#	[-t tardir] [-U] [setname ...]
 #
 # The default sets are "base comp debug etc games man misc tests text"
 # The X sets are "xbase xcomp xdebug xetc xfont xserver"
@@ -31,6 +31,7 @@ setlistdir=
 setfilesonly=false
 quiet=false
 skipkeys=time,md5,sha1,sha384,sha512,rmd160,cksum
+preserve="-pe"
 
 usage()
 {
@@ -53,6 +54,7 @@ Usage: ${prog} [-L base,x,ext] [-b] [-x]
 	-S		Exit after creating set files ${dest}/etc/mtree/set.*
 	-M metalog	metalog file
 	-N etcdir	etc dir for metalog use [${dest}/etc]
+	-U		do not preserve file permissions (with -i ..)
 	-d dest		\${DESTDIR}	[${dest}]
 	-t targetdir	\${RELEASEDIR}	[${tars}]
 	[setname ...]	Sets to build 	[${lists}]
@@ -66,7 +68,7 @@ msg()
 }
 
 # handle args
-while getopts L:bxyi:a:m:qs:F:SM:N:d:t: ch; do
+while getopts L:bxyi:a:m:qs:F:SM:N:Ud:t: ch; do
 	case ${ch} in
 	L)
 		save_IFS="${IFS}"
@@ -118,6 +120,9 @@ while getopts L:bxyi:a:m:qs:F:SM:N:d:t: 
 	N)
 		etcdir="${OPTARG}"
 		;;
+	U)
+		preserve=""
+		;;
 	d)
 		dest="${OPTARG}"
 		;;
@@ -213,10 +218,6 @@ runpax() {
 GZIP=-9n		# for pax -z
 export GZIP
 es=0
-preserve=
-if [ -n "${metalog}" ]; then
-	preserve="-pe"
-fi
 
 for setname in ${lists:-${nlists}}; do
 	out="${setname}.tgz"

Reply via email to