From 7a9b155347c117dceb866095ce87f7c7b54d053f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 16 Jul 2016 11:54:45 +0100 Subject: [PATCH] Split brain: With patches-unapplied trees, apply before running rules Everywhere we invoke dpkg-buildpackage, check if we need to apply the patches. And at the end of every command that might have done this, check if we did, and unapply them if so. We don't try to unapply patches in case of error. That seems likely to be quite fragile. Print a warning when we apply patches, suggesting ways to avoid the need. --- dgit | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/dgit b/dgit index fe1bff5f..7708fb54 100755 --- a/dgit +++ b/dgit @@ -64,6 +64,7 @@ our $quilt_mode; our $quilt_modes_re = 'linear|smash|auto|nofix|nocheck|gbp|unapplied'; our $we_are_responder; our $initiator_tempdir; +our $patches_applied_dirtily = 00; our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)"); @@ -3236,6 +3237,29 @@ sub quilt_fixup_editor () { exit 0; } +sub maybe_apply_patches_dirtily () { + return unless $quilt_mode =~ m/gbp|unapplied/; + print STDERR <