From: Ian Jackson Date: Sat, 1 Feb 2020 21:04:56 +0000 (+0000) Subject: dgit: absurd: Provide a way for absurd git to print warnings X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=ece5816db28a48e097d99da1bfaf4d853726b851 dgit: absurd: Provide a way for absurd git to print warnings The file ../../absurd-apply-warnings is dumped to dgit's stderr. Nothing writes to it yet, so no overall functional change. Signed-off-by: Ian Jackson --- diff --git a/absurd/git b/absurd/git index 0f562b54..cab0320c 100755 --- a/absurd/git +++ b/absurd/git @@ -7,6 +7,8 @@ case "$DGIT_ABSURD_DEBUG" in *) exec 3>>../../gbp-pq-output 2>&3 ;; esac +exec 4>>../../absurd-apply-warnings + log () { echo >&3 "DGIT ABSURD GIT APPLY (DEBUG) $*" echo >&2 "DGIT ABSURD GIT APPLY (STDERR) $*" diff --git a/dgit b/dgit index 4804c9bd..716cecfd 100755 --- 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 $@; }