summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure23
-rw-r--r--configure.ac13
-rw-r--r--quilt/scripts/backup-files.in28
-rw-r--r--quilt/scripts/patchfns.in10
-rw-r--r--quilt/scripts/utilfns10
5 files changed, 30 insertions, 54 deletions
diff --git a/configure b/configure
index 6b10970..305cb7c 100755
--- a/configure
+++ b/configure
@@ -4021,29 +4021,6 @@ $as_echo "$as_me: error: Please specify the location of xargs with the option '-
-{ $as_echo "$as_me:$LINENO: checking whether $XARGS -r works" >&5
-$as_echo_n "checking whether $XARGS -r works... " >&6; }
-if echo | $XARGS -r echo >/dev/null 2>&1; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- { { $as_echo "$as_me:$LINENO: error:
-Sorry, you have a version of xargs which doesn't understand -r.
-$PACKAGE_NAME needs it. If you have access to a version of xargs which
-does understand -r, you can supply its path with the
-'--with-xargs=' option.
-" >&5
-$as_echo "$as_me: error:
-Sorry, you have a version of xargs which doesn't understand -r.
-$PACKAGE_NAME needs it. If you have access to a version of xargs which
-does understand -r, you can supply its path with the
-'--with-xargs=' option.
-" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
{ $as_echo "$as_me:$LINENO: checking whether $XARGS -0 works" >&5
$as_echo_n "checking whether $XARGS -0 works... " >&6; }
if echo | $XARGS -0 echo >/dev/null 2>&1; then
diff --git a/configure.ac b/configure.ac
index 0f44a95..54d794f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -321,19 +321,6 @@ fi
QUILT_COMPAT_PROG_PATH(XARGS, xargs)
-AC_MSG_CHECKING([whether $XARGS -r works])
-if echo | $XARGS -r echo >/dev/null 2>&1; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([
-Sorry, you have a version of xargs which doesn't understand -r.
-$PACKAGE_NAME needs it. If you have access to a version of xargs which
-does understand -r, you can supply its path with the
-'--with-xargs=' option.
-])
-fi
-
AC_MSG_CHECKING([whether $XARGS -0 works])
if echo | $XARGS -0 echo >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
diff --git a/quilt/scripts/backup-files.in b/quilt/scripts/backup-files.in
index 8a8fb6c..57686fe 100644
--- a/quilt/scripts/backup-files.in
+++ b/quilt/scripts/backup-files.in
@@ -142,24 +142,36 @@ restore()
restore_all()
{
+ local FILELIST
+
(cd "$OPT_PREFIX" && find . -type d -print0) \
| xargs -0 mkdir -p
if [ ${PIPESTATUS[0]} != 0 ]; then
return 1
fi
- (cd "$OPT_PREFIX" && find . -type f -print0) \
- | xargs -0 -r rm -f
+ # Store the list of files to process
+ FILELIST=$(gen_tempfile)
+ trap "rm -f \"$FILELIST\"" EXIT
- find "$OPT_PREFIX" -type f -print \
- | while read
+ cd "$OPT_PREFIX"
+ find . -type f -print0 > "$FILELIST"
+ cd "$OLDPWD"
+
+ if [ ! -s "$FILELIST" ]; then
+ rm -f "$FILELIST"
+ exit
+ fi
+
+ xargs -0 rm -f < "$FILELIST"
+
+ while read -d $'\0' -r
do
- restore_fast "${REPLY#$OPT_PREFIX}"
- done
+ restore_fast "${REPLY#./}"
+ done < "$FILELIST"
if [ -n "$OPT_TOUCH" ]; then
- (cd "$OPT_PREFIX" && find . -type f -size +0 -print0) \
- | xargs -0 -r touch
+ xargs -0 touch -c < "$FILELIST"
fi
if [ -z "$OPT_KEEP_BACKUP" ]; then
diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
index 8d19da6..d0c426e 100644
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -847,16 +847,6 @@ in_array()
return 1
}
-gen_tempfile()
-{
- if [ "$1" = -d ]
- then
- mktemp -d ${2:-${TMPDIR:-/tmp}/quilt.}XXXXXX
- else
- mktemp ${1:-${TMPDIR:-/tmp}/quilt.}XXXXXX
- fi
-}
-
first_modified_by()
{
local file=$1 patch
diff --git a/quilt/scripts/utilfns b/quilt/scripts/utilfns
index 8a082a6..b2ab3d5 100644
--- a/quilt/scripts/utilfns
+++ b/quilt/scripts/utilfns
@@ -42,3 +42,13 @@ dirname()
fi
fi
}
+
+gen_tempfile()
+{
+ if [ "$1" = -d ]
+ then
+ mktemp -d ${2:-${TMPDIR:-/tmp}/quilt.}XXXXXX
+ else
+ mktemp ${1:-${TMPDIR:-/tmp}/quilt.}XXXXXX
+ fi
+}