Whamcloud - gitweb
LU-120 the perfect storm
authorBrian J. Murrell <brian@whamcloud.com>
Mon, 7 Mar 2011 22:37:44 +0000 (17:37 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 10 Mar 2011 01:37:05 +0000 (17:37 -0800)
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>
build/autoMakefile.am.toplevel

index ab02af9..6f45678 100644 (file)
@@ -161,6 +161,7 @@ debs:
        if [ -d .git ]; then \
                build/extract_patches .; \
        fi
        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]}; \
        rm -rf debs
        dpkg-buildpackage -I.git -I\*.out[0-9]\* -I\*.swp || { \
                rc=$${PIPESTATUS[0]}; \