There is a corner case in the debian patching/unpatching process
where a patch converts the use of a given file to a file.in that is
to be substed. The problem is that between the configure and the
make debs, a file, which a debian patch wants to remove already
exists (it was created by the configure) and dpkg-buildpackage's
unpatch step fails becuase it wants to try to create a file which
configure already created.
Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I185e496b82687d21ea3d744e939536c106b702f9
Reviewed-on: http://review.whamcloud.com/308
Tested-by: Hudson
Reviewed-by: Robert Read <rread@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if [ -d .git ]; then \
build/extract_patches .; \
fi
+ cat debian/patches/* | sed -ne '/^diff --git/h' -e '/^deleted file/{G;s/^.* b\/\(.*\)/\1/p;}' | xargs rm -f; \
rm -rf debs
dpkg-buildpackage -I.git -I\*.out[0-9]\* -I\*.swp || { \
rc=$${PIPESTATUS[0]}; \