When patch files are passed through stdin, we get the actual patch file name from procfs. It turns out that procfs resolves symbolic links, and that breaks our later attempt to strip the prefix from the path to extract a relative path to the patch file.
This is solved by also resolving symbolic links in the prefix before stripping it. Signed-off-by: Jean Delvare <[email protected]> --- quilt/scripts/inspect-wrapper.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/quilt/scripts/inspect-wrapper.in +++ b/quilt/scripts/inspect-wrapper.in @@ -268,7 +268,15 @@ esac if [ -n "$QUILT_SETUP_FAST" -a -z "$inputfile" ] then inputfile=$(readlink /proc/self/fd/0) - [ "${inputfile:0:1}" = / -a -f "$inputfile" ] || inputfile= + if [ "${inputfile:0:1}" = / -a -f "$inputfile" ] + then + # procfs resolved the symlinks, so do the same, otherwise the + # path prefix won't match + RPM_SOURCE_DIR=$(cd -P "$RPM_SOURCE_DIR" && echo "$PWD")/ + else + # Didn't work, so fall back to the slow method + inputfile= + fi fi if [ -n "$inputfile" ] -- Jean Delvare SUSE L3 Support _______________________________________________ Quilt-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/quilt-dev
