chiark / gitweb /
dgit: absurd: Provide a way for absurd git to print warnings
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 4804c9bd055f39880a28676ce5ec8bac62099cd2..716cecfd5febfbd7452229a8caa2e99c890ce146 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -36,6 +36,7 @@ use File::Path;
 use File::Spec;
 use File::Temp qw(tempdir);
 use File::Basename;
+use File::Copy ();
 use Dpkg::Version;
 use Dpkg::Compression;
 use Dpkg::Compression::Process;
@@ -2659,6 +2660,8 @@ END
                chomp $@;
                progress "warning: $@";
                $path = "$absurdity:$path";
+               open T, ">../../absurd-apply-warnings" or die $!;
+               close T or die $!;
                progress f_ "%s: trying slow absurd-git-apply...", $us;
                rename "../../gbp-pq-output","../../gbp-pq-output.0"
                    or $!==ENOENT
@@ -2693,6 +2696,11 @@ gbp-pq import and dpkg-source disagree!
  dpkg-source --before-build gave tree %s
 END
                $rawimport_hash = $gapplied;
+
+               if ($use_absurd) {
+                   File::Copy::copy("../../absurd-apply-warnings", \*STDERR)
+                         or die $!;
+               }
            };
            last unless $@;
        }