Bug#769520: dpkg-dev: debuild clean fails to first apply patches to source in quilt 3.0 format

2014-11-14 Thread Faheem Mitha


On Fri, 14 Nov 2014, Raphael Hertzog wrote:


On Fri, 14 Nov 2014, Faheem Mitha wrote:

Hi Raphael,

Ok, if you don't think it is a bug, please close it.


I'll let Guillem do that if he agrees with me.


Ok.


If you can take a moment, can you advise me what the correct approach to
handling this should be? Just make sure to push the patches before running
'debuild clean'? Thanks.


It depends on why you're trying to clean your source package.

If it's just after a build, you might want to consider using the "-tc"
option that calls the clean target after a successfull build.


Ok, I'll consider doing that. Thanks.


Usually "debian/rules clean" tends to work even with patches unapplied but
in the few cases where it doesn't, it's certainly ok if you manually
ensure that they are applied.

Note that the default state of the source package after "dpkg-source -x"
is patches applied... if you use a workflow where patches are unapplied,
it's up to this workflow to ensure that they are applied at the correct
time.


Ok. I think that at the end of a build the patches are unapplied, so 
calling clean directly after completion of a build can fail if it requires 
patches to be applied.


Thanks.
   Regards, Faheem


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



Bug#769520: dpkg-dev: debuild clean fails to first apply patches to source in quilt 3.0 format

2014-11-14 Thread Raphael Hertzog
On Fri, 14 Nov 2014, Faheem Mitha wrote:
> Hi Raphael,
> 
> Ok, if you don't think it is a bug, please close it.

I'll let Guillem do that if he agrees with me.

> If you can take a moment, can you advise me what the correct approach to
> handling this should be? Just make sure to push the patches before running
> 'debuild clean'? Thanks.

It depends on why you're trying to clean your source package.

If it's just after a build, you might want to consider using the "-tc"
option that calls the clean target after a successfull build.

Usually "debian/rules clean" tends to work even with patches unapplied but
in the few cases where it doesn't, it's certainly ok if you manually
ensure that they are applied.

Note that the default state of the source package after "dpkg-source -x"
is patches applied... if you use a workflow where patches are unapplied,
it's up to this workflow to ensure that they are applied at the correct
time.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/


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



Bug#769520: dpkg-dev: debuild clean fails to first apply patches to source in quilt 3.0 format

2014-11-14 Thread Faheem Mitha


On Fri, 14 Nov 2014, Raphael Hertzog wrote:


On Fri, 14 Nov 2014, Faheem Mitha wrote:

The subject line says it all. I noticed today that if the patches in
debian/patches are not applied, then

debuild clean

does not apply them, and if a patch is required to run clean
successfully, then clean fails. Included is the clean section of
debian/rules for my example package, and also the output of running
'debuild clean' with and without patches applied.

I think that debuild clean (or to be precise, the underlying
dpkg-buildpackage) command should apply the patches before running any
command, and presumably unapply it afterwards. I don't see a downside
to this.


dpkg-buildpackage is not called when you run "debuild clean". The
manual page clearly indicates that it calls "debian/rules "
directly. And your log doesn't show any message of dpkg-buildpackage.

In general, opting to call a specific target doesn't do any build
preparation work. It's the same if you do "dpkg-buildpackage --target=clean".

I'm not sure this can be considered as a bug. It behaves as documented.


Hi Raphael,

Ok, if you don't think it is a bug, please close it.

If you can take a moment, can you advise me what the correct approach to 
handling this should be? Just make sure to push the patches before running 
'debuild clean'? Thanks.


   Regards, Faheem


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



Bug#769520: dpkg-dev: debuild clean fails to first apply patches to source in quilt 3.0 format

2014-11-14 Thread Raphael Hertzog
On Fri, 14 Nov 2014, Faheem Mitha wrote:
> The subject line says it all. I noticed today that if the patches in
> debian/patches are not applied, then
> 
> debuild clean
> 
> does not apply them, and if a patch is required to run clean
> successfully, then clean fails. Included is the clean section of
> debian/rules for my example package, and also the output of running
> 'debuild clean' with and without patches applied.
> 
> I think that debuild clean (or to be precise, the underlying
> dpkg-buildpackage) command should apply the patches before running any
> command, and presumably unapply it afterwards. I don't see a downside
> to this.

dpkg-buildpackage is not called when you run "debuild clean". The
manual page clearly indicates that it calls "debian/rules "
directly. And your log doesn't show any message of dpkg-buildpackage.

In general, opting to call a specific target doesn't do any build
preparation work. It's the same if you do "dpkg-buildpackage --target=clean".

I'm not sure this can be considered as a bug. It behaves as documented.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: http://www.freexian.com/services/debian-lts.html
Learn to master Debian: http://debian-handbook.info/get/


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



Bug#769520: dpkg-dev: debuild clean fails to first apply patches to source in quilt 3.0 format

2014-11-14 Thread Faheem Mitha
Package: dpkg-dev
Version: 1.17.21
Severity: wishlist

Dear Maintainer,

NOTE: This is being run inside a jessie chroot on a wheezy system.

The subject line says it all. I noticed today that if the patches in
debian/patches are not applied, then

debuild clean

does not apply them, and if a patch is required to run clean
successfully, then clean fails. Included is the clean section of
debian/rules for my example package, and also the output of running
'debuild clean' with and without patches applied.

I think that debuild clean (or to be precise, the underlying
dpkg-buildpackage) command should apply the patches before running any
command, and presumably unapply it afterwards. I don't see a downside
to this.
 
 Regards, Faheem Mitha

###
section of debian/rules dealing with clean
###

override_dh_auto_clean:
find . -name "*.pyc" -delete
find . -name symbols_scraped_inc.h -delete
find . -name _symbolTableAfterBuild.txt -delete
rm -rf debian/build
rm -rf src/lisp/build
rm -f src/core/a
rm -f src/core/b
rm -f src/main/taa.sh
rm -f src/main/clasp_gc.ccBackup
rm -f src/main/clasp_gc.telemetry.cc
rm -f bin/config.log
rm -f boost_build_v2/b2
rm -f boost_build_v2/engine/bin.macosxx86_64/b2
rm -f boost_build_v2/bin/config.log
rm -f boost_build_v2/bjam
rm -f boost_build_v2/bootstrap.log
rm -f boost_build_v2/engine/bin.linuxx86_64/b2
rm -f boost_build_v2/engine/bin.linuxx86_64/bjam
rm -f boost_build_v2/engine/bootstrap/jam0
rm -f src/core/_symbolTableAfterBuild.txt
rm -f src/core/registerClasses.log
rm -f src/core/symbols_scraped_inc.h
rm -f src/llvmo/_symbolTableAfterBuild.txt
rm -f src/llvmo/symbols_scraped_inc.h
rm -f 
src/mpip/bin/boehm/clang-linux-3.6.0/release/link-static/mpip_scrape_flag.h
rm -f src/main/image_test_prepass.bc
rm -f src/asttooling/registerClasses.log
rm -f src/cffi/registerClasses.log
rm -f src/clbind/registerClasses.log
rm -f src/gctools/registerClasses.log
rm -f src/llvmo/registerClasses.log
rm -f src/serveEvent/registerClasses.log
rm -f src/sockets/registerClasses.log
make clean

###
Just running debuild clean


(jessiechroot)faheem@orwell:/usr/local/src/clasp-llvm/clasp-llvm-0.1$
debuild clean
dh clean
   dh_testdir
  debian/rules override_dh_auto_clean
  make[1]: Entering directory
'/usr/local/src/clasp-llvm/clasp-llvm-0.1'
find . -name "*.pyc" -delete
find . -name symbols_scraped_inc.h -delete
find . -name _symbolTableAfterBuild.txt -delete
rm -rf debian/build
rm -rf src/lisp/build
rm -f src/core/a
rm -f src/core/b
rm -f src/main/taa.sh
rm -f src/main/clasp_gc.ccBackup
rm -f src/main/clasp_gc.telemetry.cc
rm -f bin/config.log
rm -f boost_build_v2/b2
rm -f boost_build_v2/engine/bin.macosxx86_64/b2
rm -f boost_build_v2/bin/config.log
rm -f boost_build_v2/bjam
rm -f boost_build_v2/bootstrap.log
rm -f boost_build_v2/engine/bin.linuxx86_64/b2
rm -f boost_build_v2/engine/bin.linuxx86_64/bjam
rm -f boost_build_v2/engine/bootstrap/jam0
rm -f src/core/_symbolTableAfterBuild.txt
rm -f src/core/registerClasses.log
rm -f src/core/symbols_scraped_inc.h
rm -f src/llvmo/_symbolTableAfterBuild.txt
rm -f src/llvmo/symbols_scraped_inc.h
rm -f
src/mpip/bin/boehm/clang-linux-3.6.0/release/link-static/mpip_scrape_flag.h
rm -f src/main/image_test_prepass.bc
rm -f src/asttooling/registerClasses.log
rm -f src/cffi/registerClasses.log
rm -f src/clbind/registerClasses.log
rm -f src/gctools/registerClasses.log
rm -f src/llvmo/registerClasses.log
rm -f src/serveEvent/registerClasses.log
rm -f src/sockets/registerClasses.log
make clean
make[2]: Entering directory '/usr/local/src/clasp-llvm/clasp-llvm-0.1'
makefile:1: local.config: No such file or directory
make[2]: *** No rule to make target 'local.config'.  Stop.
make[2]: Leaving directory '/usr/local/src/clasp-llvm/clasp-llvm-0.1'
debian/rules:14: recipe for target 'override_dh_auto_clean' failed
make[1]: *** [override_dh_auto_clean] Error 2
make[1]: Leaving directory '/usr/local/src/clasp-llvm/clasp-llvm-0.1'
debian/rules:11: recipe for target 'clean' failed
make: *** [clean] Error 2
debuild: fatal error at line 1346:
couldn't exec fakeroot debian/rules: 
##

##
Applying patches first, then running debuild clean
##

(jessiechroot)faheem@orwell:/usr/local/src/clasp-llvm/clasp-llvm-0.