On Mon, 21 Nov 2011, Jonathan Nieder wrote: > Robert Luberda wrote: > > I've just came up with another reason why the current behavious is > > wrong: let's imagine that maintainer modifies the clean action of > > upstream's Makefile (see the latest bsd-mailx for example). Than a > > `debuild clean' (or dpkg-buildpackage -Tclean) won't run the modified > > clean target. > > Sounds like a bug. > > The DESCRIPTION section of the dpkg-buildpackage(1) manpage says: > > 1. It prepares the build environment by setting various > environment variables (see ENVIRONMENT) and calls "dpkg-source > --before-build" (unless -T or --target has been used). > > However, the OPTIONS section says: > > -Ttarget > Calls "debian/rules target" after having setup the > build environment and stops the package build process > here. If --as-root is also given, then the command is > executed as root (see -r). Note that official targets > that are required to be run as root by the Debian > policy do not need this option. > > Isn't calling "dpkg-source --before-build" part of setting up the > build environment?
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... So 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. Maybe this was a poor choice. But it was on purpose... Cheers, -- Raphaël Hertzog ◈ Debian Developer Pre-order a copy of the Debian Administrator's Handbook and help liberate it: http://debian-handbook.info/go/ulule-rh/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org