The pbuilder and cowbuilder subcommands will reuse this code.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
- build_prep(WANTSRC_SOURCE); # not BUILDER because sbuild uses the .dsc
+ build_prep_early();
+ build_with_binary_builder(\@sbuild, <<END, qw(-d), $isuite, @ARGV, $dscfn);
+perhaps you need to pass -A ? (sbuild's default is to build only
+arch-specific binaries; dgit 1.4 used to override that.)
+END
+}
+
+sub build_with_binary_builder ($$$) {
+ my ($bbuilder, $pbmc_msg, @args) = @_;
+ build_prep(WANTSRC_SOURCE);
build_source();
midbuild_checkchanges();
in_bpd {
build_source();
midbuild_checkchanges();
in_bpd {
stat_exists $sourcechanges
or fail "$sourcechanges (in build products dir): $!";
}
stat_exists $sourcechanges
or fail "$sourcechanges (in build products dir): $!";
}
- runcmd_ordryrun_local @sbuild, qw(-d), $isuite, @ARGV, $dscfn;
+ runcmd_ordryrun_local @$bbuilder, @args;
};
maybe_unapply_patches_again();
in_bpd {
};
maybe_unapply_patches_again();
in_bpd {
- postbuild_mergechanges(<<END);
-perhaps you need to pass -A ? (sbuild's default is to build only
-arch-specific binaries; dgit 1.4 used to override that.)
-END
+ postbuild_mergechanges($pbmc_msg);
sub cmd_quilt_fixup {
badusage "incorrect arguments to dgit quilt-fixup" if @ARGV;
sub cmd_quilt_fixup {
badusage "incorrect arguments to dgit quilt-fixup" if @ARGV;