diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2018-07-27 12:08:53 +0800 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2018-07-28 12:12:05 +0800 |
commit | dad4b4972a5716cbafb9b9347cec5d7e90a55b80 (patch) | |
tree | f8f947a08419fd3cfe8d86be449b18c76a922cd5 /dgit | |
parent | 363bb8c82470b15808324744004ce16948136d41 (diff) |
dgit: factor out build_with_binary_builder()
The pbuilder and cowbuilder subcommands will reuse this code.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -6492,7 +6492,16 @@ sub cmd_push_source { } sub cmd_sbuild { - 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 { @@ -6501,16 +6510,13 @@ sub cmd_sbuild { 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 { - 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; |