SHA256
1
0
forked from pool/quilt
quilt/hackweek-11-04-pass-through.patch

33 lines
892 B
Diff
Raw Normal View History

From: Jean Delvare <jdelvare@suse.de>
Subject: inspect: Pass through the wrappers when appropriate
Upstream: Committed (e3ee2d8596cbac98d29d72292b6b45706c0010af)
The wrappers may be called before the %prep section is entered, in
which case RPM_BUILD_DIR isn't set yet. In that case we want to
pass trough transparently.
---
quilt/scripts/inspect.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/quilt/scripts/inspect.in
+++ b/quilt/scripts/inspect.in
@@ -358,6 +358,10 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
echo "$dir"
}
+ PATH=${PATH#*:}
+ # If we are called too early, pass through without processing
+ [ -n "$RPM_BUILD_DIR" ] || exec ${0##*/} "$@"
+
tmpdir=${RPM_BUILD_DIR%/*}
rm -f $tmpdir/data
case "${0##*/}" in
@@ -404,7 +408,6 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
esac
fi
- PATH=${PATH#*:}
if [ -n "$inputfile" ]
then
${0##*/} "$@"