Apparently rpmbuild will resolve symbolic links to patch files before
passing them to the patch utility. We need to do the same before we
attempt to turn absolute paths into relative paths for the series
file, otherwise we will fail to match the common path.

Signed-off-by: Jean Delvare <[email protected]>
---
 quilt/scripts/inspect-wrapper.in |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/quilt/scripts/inspect-wrapper.in
+++ b/quilt/scripts/inspect-wrapper.in
@@ -276,6 +276,14 @@ then
        if [ "${inputfile:0:1}" = / ]
        then
                unpackfile=${inputfile/$RPM_SOURCE_DIR}
+               # This may fail if rpmbuild resolved a symbolic link on the
+               # way to the source directory. If so, also resolve symbolic
+               # links to find the matching prefix.
+               if [ "${unpackfile:0:1}" = / ]
+               then
+                       RPM_SOURCE_DIR_P=$(cd -P "$RPM_SOURCE_DIR" && echo 
"$PWD")/
+                       unpackfile=${inputfile/$RPM_SOURCE_DIR_P}
+               fi
        else
                unpackfile=$QUILT_SETUP_PREFIX$(dir_to_dir "$RPM_BUILD_DIR" 
"$inputfile")
        fi

-- 
Jean Delvare
SUSE L3 Support


_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to