On Mon, Jun 13, 2011 at 05:30:53PM -0400, Joey Hess wrote: > Roger Leigh wrote: > > Sorry, wrong version of second patch; I've attached the correct one. > > This was pretty close. I've cleaned it up in the smarter-targets > branch, including inlining away recursive calls to debian/rules for > implicit targets. See what you think. Note: I have not decided if this > is too likely to cause breakage to make it v9 only or not.
I've looked over all the changes, and it looks good. I do like the sequence inlining. Only paying the performance penalty when you explicitly override is a nice touch. While I've not yet had time to debug it, the attached rules file (implementing custom build-indep, build-arch, install-arch and install-indep targets) makes dh blow up. It freezes, and top showed repeated forking of dh: ... 13082 tty3 S+ 0:00 /usr/bin/perl -w /home/rleigh/bin/dh debhelper-fail-me --with autotools_dev --builddirectory=debian/build --parallel 13100 tty3 S+ 0:00 /usr/bin/perl -w /home/rleigh/bin/dh debhelper-fail-me --with autotools_dev --builddirectory=debian/build --parallel 13117 tty3 S+ 0:00 /usr/bin/perl -w /home/rleigh/bin/dh debhelper-fail-me --with autotools_dev --builddirectory=debian/build --parallel 13134 tty3 S+ 0:00 /usr/bin/perl -w /home/rleigh/bin/dh debhelper-fail-me --with autotools_dev --builddirectory=debian/build --parallel 13151 tty3 S+ 0:00 /usr/bin/perl -w /home/rleigh/bin/dh debhelper-fail-me --with autotools_dev --builddirectory=debian/build --parallel 13168 tty3 S+ 0:00 /usr/bin/perl -w /home/rleigh/bin/dh debhelper-fail-me --with autotools_dev --builddirectory=debian/build --parallel ... This is due to calling rules_explicit_target before you check if the sequence is valid (debhelper-fail-me) which leads to infinite forking since each dh runs rules_explicit_target which runs make, which runs rules_explicit_target... etc. My patch 0002 solved this by moving all rules_explicit_target invocations to after the sequence is found to be valid to present this recursion. So you could move things later, or check if @ARGV contains debhelper-fail-me earlier on. Other than that, I'm quite happy with all the changes; I think it will be a big improvement in the usability of dh (which was already very good). Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature

