diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | lib/patchfns.in | 10 | ||||
-rw-r--r-- | quilt.changes | 5 | ||||
-rw-r--r-- | quilt/add.in | 2 | ||||
-rw-r--r-- | quilt/diff.in | 2 | ||||
-rw-r--r-- | quilt/import.in | 6 | ||||
-rw-r--r-- | quilt/refresh.in | 4 | ||||
-rw-r--r-- | quilt/remove.in | 2 | ||||
-rw-r--r-- | quilt/setup.in | 2 |
9 files changed, 21 insertions, 14 deletions
@@ -15,6 +15,7 @@ PERL := /usr/bin/perl BASH := /bin/bash DIFF := /usr/bin/diff PATCH := /usr/bin/patch +MKTEMP := /bin/mktemp CFLAGS = -g -Wall @@ -144,5 +145,6 @@ clean distclean : -e "s:@BASH@:$(BASH):g" \ -e "s:@DIFF@:$(DIFF):g" \ -e "s:@PATCH@:$(PATCH):g" \ + -e "s:@MKTEMP@:$(MKTEMP):g" \ $< > $@ @chmod --reference=$< $@ diff --git a/lib/patchfns.in b/lib/patchfns.in index 4d57d5c..b693457 100644 --- a/lib/patchfns.in +++ b/lib/patchfns.in @@ -108,7 +108,7 @@ change_db_strip_level() if [ -e $SERIES ] then - local tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) + local tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) awk ' /^'"$(quote_re $patch)"'(\.patch|\.diff?)(|\.gz|\.bz2)([ \t]|$)/ \ { for(i=2; i<=NF; i++) @@ -155,7 +155,7 @@ insert_in_series() patch_args=" $patch_args" fi - tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) || return 1 + tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) || return 1 mkdir -p $(dirname $SERIES) if [ -n "$top" ] then @@ -184,7 +184,7 @@ remove_from_series() { local patch=$1 - tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) || return 1 + tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) || return 1 awk ' ! /^'"$(quote_re $patch)"'(|\.patch|\.diff?)(|\.gz|\.bz2)([ \t]|$)/ \ { print } @@ -418,7 +418,7 @@ remove_from_db() { local patch=$1 local tmpfile - if tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) + if tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) then grep -v -E "^$(quote_re $patch)\$" $DB > $tmpfile mv -f $tmpfile $DB @@ -486,7 +486,7 @@ refresh_file_list() then local tmpfile status if ! mkdir -p $(dirname $pc_file) || \ - ! tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) + ! tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) then return 1 fi diff --git a/quilt.changes b/quilt.changes index c75c543..059b2bf 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Jan 30 23:15:36 +0100 2003 - agruen@suse.de + +- Also substitute @MKTEMP@. + +------------------------------------------------------------------- Thu Jan 30 19:02:14 +0100 2003 - agruen@suse.de - Allow a file list to be diffed to be passed to quilt diff. Add diff --git a/quilt/add.in b/quilt/add.in index c543e4f..2498bc8 100644 --- a/quilt/add.in +++ b/quilt/add.in @@ -116,7 +116,7 @@ do # As the file may likely be modified by hand # now, create a copy to make sure nothing # happens to the original file. - tmpfile=$(mktemp $file.XXXXXX) && + tmpfile=$(@MKTEMP@ $file.XXXXXX) && cp -f $file $tmpfile && mv -f $tmpfile $file rm -f $tmpfile diff --git a/quilt/diff.in b/quilt/diff.in index 9f20cbd..3e81ebe 100644 --- a/quilt/diff.in +++ b/quilt/diff.in @@ -195,7 +195,7 @@ if [ -n "$opt_relative" ] then patch_file=$(patch_file_name $last_patch) patch_args=$(patch_args $last_patch) - workdir=$(mktemp -d patch-scripts.XXXXXX) + workdir=$(@MKTEMP@ -d patch-scripts.XXXXXX) pwd=$PWD if ! cd .pc/$last_patch diff --git a/quilt/import.in b/quilt/import.in index d3d115c..eae717d 100644 --- a/quilt/import.in +++ b/quilt/import.in @@ -114,7 +114,7 @@ fi case "$input_file" in '') - tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) + tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) if ! cat > $tmpfile then echo "Cannot read from standard input." @@ -123,7 +123,7 @@ case "$input_file" in fi input_file=$tmpfile ;; *.gz) - tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) + tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) if ! gzip -cd "$input_file" > $tmpfile then echo "Cannot decompress file $input_file" @@ -132,7 +132,7 @@ case "$input_file" in fi input_file=$tmpfile ;; *.bz2) - tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) + tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) if ! bzip2 -cd "$input_file" > $tmpfile then echo "Cannot decompress file $input_file" diff --git a/quilt/refresh.in b/quilt/refresh.in index d21fbf8..40ab452 100644 --- a/quilt/refresh.in +++ b/quilt/refresh.in @@ -129,7 +129,7 @@ fi trap "die 1" SIGTERM -tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) +tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) for file in $(files_in_patch $patch) do @@ -176,7 +176,7 @@ then cat $tmpfile \ | @LIB@/parse-patch -u patch $patch_file else - if ! tmpfile2=$(mktemp /tmp/patch-scripts.XXXXXX) + if ! tmpfile2=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) then die 1 fi diff --git a/quilt/remove.in b/quilt/remove.in index cc0960d..63d6d56 100644 --- a/quilt/remove.in +++ b/quilt/remove.in @@ -109,7 +109,7 @@ do fi pc_file=$(pc_file_name $patch) - tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) && + tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) && grep -v '^'"$(quote_re $file)"'$' $pc_file > $tmpfile && mv -f $tmpfile $pc_file rm -f $tmpfile diff --git a/quilt/setup.in b/quilt/setup.in index c4f8aff..2fc40a2 100644 --- a/quilt/setup.in +++ b/quilt/setup.in @@ -84,7 +84,7 @@ fi case "$1" in *.spec) spec_file="$1" - tmpfile=$(mktemp /tmp/patch-scripts.XXXXXX) + tmpfile=$(@MKTEMP@ /tmp/patch-scripts.XXXXXX) series_file=$tmpfile if ! @LIB@/spec2series "$spec_file" > $tmpfile then |