Author: adam-guest
Date: 2008-04-15 16:58:19 +0000 (Tue, 15 Apr 2008)
New Revision: 1345
Modified:
trunk/debian/changelog
trunk/scripts/debuild.1
trunk/scripts/debuild.pl
Log:
debuild:
+ Run dpkg-buildpackage directly where possible, rather than emulating it.
Emulation will still be used if any of the clean, dpkg-source, build,
binary, dpkg-genchanges or final-clean hooks are defined, as dpkg
does not currently support them.
+ Make it clearer that a particular invocation is using the emulated
dpkg-buildpackage, and why.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-04-15 16:55:06 UTC (rev 1344)
+++ trunk/debian/changelog 2008-04-15 16:58:19 UTC (rev 1345)
@@ -37,6 +37,13 @@
* debian/control:
+ Suggest instead of Recommending gnuplot and cvs-buildpackage
+ Suggest svn-buildpackage (Closes: #476240)
+ * debuild:
+ + Run dpkg-buildpackage directly where possible, rather than emulating it.
+ Emulation will still be used if any of the clean, dpkg-source, build,
+ binary, dpkg-genchanges or final-clean hooks are defined, as dpkg
+ does not currently support them.
+ + Make it clearer that a particular invocation is using the emulated
+ dpkg-buildpackage, and why.
* licensecheck: Replace a literal copyright symbol with a hex escape
so that the package builds using etch's po4a (Closes: #476251)
* mergechanges:
Modified: trunk/scripts/debuild.1
===================================================================
--- trunk/scripts/debuild.1 2008-04-15 16:55:06 UTC (rev 1344)
+++ trunk/scripts/debuild.1 2008-04-15 16:58:19 UTC (rev 1345)
@@ -144,7 +144,11 @@
preserved across upgrades.
.SH HOOKS
\fBdebuild\fR supports a number of hooks when running
-\fBdpkg\-buildpackage\fR. The available hooks are as follows:
+\fBdpkg\-buildpackage\fR. Note that if any of the hooks from
+clean-hook to final-clean (inclusive) are used, \fBdebuild\fR
+will emulate some sections of the \fBdpkg-buildpackage\fR process
+rather than running them directly, as \fBdpkg-buildpackage\fR
+does not support hooks. The available hooks are as follows:
.TP
dpkg-buildpackage-hook
Run before dpkg-buildpackage begins by calling dpkg-checkbuilddeps.
Modified: trunk/scripts/debuild.pl
===================================================================
--- trunk/scripts/debuild.pl 2008-04-15 16:55:06 UTC (rev 1344)
+++ trunk/scripts/debuild.pl 2008-04-15 16:58:19 UTC (rev 1345)
@@ -184,6 +184,7 @@
my $tgz_check=1;
my $prepend_path='';
my $username='';
+my $emulate_dpkgbp = 0;
my @hooks = (qw(dpkg-buildpackage clean dpkg-source build binary final-clean
lintian signing post-dpkg-buildpackage));
my %hook;
@@ -737,6 +738,18 @@
my $ans = <STDIN>;
exit 1 unless $ans =~ /^y/i;
}
+ } else {
+ # check hooks
+ my @skip_hooks = ();
+ for my $hookname (qw(clean dpkg-source build binary dpkg-genchanges
+ final-clean)) {
+ if ($hook{$hookname}) { push @skip_hooks, $hookname; }
+ }
+ if (@skip_hooks) {
+ $emulate_dpkgbp = 1;
+ warn "$progname: emulating dpkg-buildpackage as the following hooks
were defined:\n"
+ . " " . join(", ", @skip_hooks) . "\n\n";
+ }
}
# Our first task is to parse the command line options.
@@ -986,6 +999,12 @@
@changes = sort { -M $a <=> -M $b } @changes;
$changes = $changes[0];
}
+ } elsif ($emulate_dpkgbp == 0) {
+ unshift @dpkg_opts, ($checkbuilddep ? "-D" : "-d");
+ unshift @dpkg_opts, "-r$root_command" if $root_command;
+ system_withecho('dpkg-buildpackage', @dpkg_opts);
+
+ chdir '..' or fatal "can't chdir: $!";
} else {
# Not using dpkg-cross, so we emulate dpkg-buildpackage ourselves
# We emulate the version found in dpkg-buildpackage-snapshot in
--
To unsubscribe, send mail to [EMAIL PROTECTED]