diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-30 19:44:43 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-30 22:18:12 +0000 |
commit | 8e3a97ee058cdfd1d9318fff2e9dcea9c78bb98d (patch) | |
tree | 6e18d06ad754bfa513937dbbdbe1ddae2a9161f1 /dgit | |
parent | be4d76851f775f1863ff597ddb7adf171d8bb583 (diff) |
dgit: Introduce build_prep_early
Currently only one call site which is only ever called once. We make
it idempotent since we're going to want that.
No functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -4963,15 +4963,21 @@ sub cmd_clean () { maybe_unapply_patches_again(); } -sub build_prep () { +sub build_prep_early () { + our $build_prep_early_done //= 0; + return if $build_prep_early_done++; notpushing(); badusage "-p is not allowed when building" if defined $package; - check_not_dirty(); - clean_tree(); my $clogp = parsechangelog(); $isuite = getfield $clogp, 'Distribution'; $package = getfield $clogp, 'Source'; $version = getfield $clogp, 'Version'; + check_not_dirty(); +} + +sub build_prep () { + build_prep_early(); + clean_tree(); build_maybe_quilt_fixup(); if ($rmchanges) { my $pat = changespat $version; |