If the input file is passed as a command line parameter, we already
know its name, don't waste time looking it up.
---
quilt/scripts/inspect-wrapper.in | 24 +++++++++++++++---------
quilt/setup.in | 1 +
2 files changed, 16 insertions(+), 9 deletions(-)
--- a/quilt/scripts/inspect-wrapper.in
+++ b/quilt/scripts/inspect-wrapper.in
@@ -236,21 +236,27 @@ unzip)
inputfile=$(unzip_input_file "$@")
;;
esac
+
if [ -n "$inputfile" ]
then
- unpackfile=$(original_file "$inputfile")
+ if [ "${inputfile:0:1}" = / ]
+ then
+ unpackfile=${inputfile/$RPM_SOURCE_DIR}
+ else
+ unpackfile=$QUILT_SETUP_PREFIX$(dir_to_dir "$RPM_BUILD_DIR"
"$inputfile")
+ fi
else
# put data from stdin into tmpfile
cat > $tmpdir/data
unpackfile=$(original_file $tmpdir/data)
-fi
-if [ $? -ne 0 ]
-then
- # Report problem to the caller
- echo -n "?" >&4
- printf "Warning: no match for file with md5sum %s\n" \
- $unpackfile >&2
- unpackfile="#$unpackfile"
+ if [ $? -ne 0 ]
+ then
+ # Report problem to the caller
+ echo -n "?" >&4
+ printf "Warning: no match for file with md5sum %s\n" \
+ $unpackfile >&2
+ unpackfile="#$unpackfile"
+ fi
fi
case $command in
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -229,6 +229,7 @@ inspect()
# Standard mode
mkdir -p $tmpdir/build
fi
+ export -f normalize_path dir_to_dir
# Redirect file descriptors
# 5 is used in verbose mode, 4 in non-verbose mode, and 2 for both
(real errors)
--
Jean Delvare
SUSE L3 Support
_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev