retitle 649531 dpkg-buildpackage -T: manpage should explain need to run 
"dpkg-source --before-build" first
severity 649531 minor
quit

Raphael Hertzog wrote:

> I'm pretty sure we will have people complaining that "debuild clean"
> should also unapply the patches if they have been applied by the
> command...

Oh, dear.  I guess it could do that. :/

> I initially left "before-build" disabled on the basis that the -T
> option was mainly used for non-standard build targets or for people who
> know what they are doing.

I never understood the point of "dpkg-buildpackage -Tclean" as opposed
to "debian/rules clean" at all. :)

> Maybe this was a poor choice. But it was on purpose...

Hm.  In the case of "debuild clean", using the hooks would make sense:

        # apply patches so "make clean" will behave appropriately
        dpkg-source --before-build .

        # invoke "clean" target
        DEB_BUILD_ARCH=... debian/rules clean

        # unapply patches to simulate workflow in which "debian/rules
        # clean" would have unapplied patches
        dpkg-source --after-build .

On the other hand, in the case of "debuild build", it is not so nice.

        # apply patches so "make" will behave appropriately
        dpkg-source --before-build .

        # invoke "build" target
        DEB_BUILD_ARCH=... debian/rules build

        # unapply patches.  Breaks all the time stamps, unfortunately.
        dpkg-source --after-build .

I guess "dpkg-buildpackage -T" is just about envvars, and the caller
is responsible for applying patches when appropriate.  So let's make
this bug into one about documentation.

Thanks for the nice explanation.



-- 
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to