summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhang zhigang <zg84.zhang@samsung.com>2022-12-14 03:11:37 +0000
committerGerrit Code Review <gerrit@review>2022-12-14 03:11:37 +0000
commit89f5312b6b89127a77c4ec7959ef338bde9d21f9 (patch)
tree6b56f7a30cade62998b99a72e321ea0cb9aa8c0b
parent470fb6a944f672bb2fe457825955d8d702c80666 (diff)
parent8761d67e2303552f6dcfc75a39e07f0db42816d5 (diff)
downloadbuild-89f5312b6b89127a77c4ec7959ef338bde9d21f9.tar.gz
build-89f5312b6b89127a77c4ec7959ef338bde9d21f9.tar.bz2
build-89f5312b6b89127a77c4ec7959ef338bde9d21f9.zip
Merge "Print dependency expansion debug messages to STDERR" into devel
-rw-r--r--Build.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/Build.pm b/Build.pm
index dd06de3..437fea3 100644
--- a/Build.pm
+++ b/Build.pm
@@ -26,7 +26,7 @@ use Build::Rpm;
use Data::Dumper;
use POSIX qw(strftime);
-our $expand_dbg;
+our $expand_dbg = $ENV{BUILD_EXPAND_DEBUG} || undef;
our $do_rpm;
our $do_deb;
@@ -1040,7 +1040,7 @@ sub expand {
}
next if $p{$q[0]};
return (undef, "$q[0] $aconflicts{$q[0]}") if $aconflicts{$q[0]};
- print "added $q[0] because of $p (direct dep)\n" if $expand_dbg;
+ print STDERR "added $q[0] because of $p (direct dep)\n" if $expand_dbg;
push @p, $q[0];
$p{$q[0]} = 1;
$aconflicts{$_} = "conflict from project config with $q[0]" for @{$conflicts->{$q[0]} || []};
@@ -1097,7 +1097,7 @@ sub expand {
}
if (@q > 1 && !$doamb) {
push @pamb, $p unless @pamb && $pamb[-1] eq $p;
- print "undecided about $p:$r: @q\n" if $expand_dbg;
+ print STDERR "undecided about $p:$r: @q\n" if $expand_dbg;
next;
}
if (@q > 1) {
@@ -1125,7 +1125,7 @@ sub expand {
if ($doamb == 2) {
todo2recommended($config, \%recommended, \@rec_todo) if @rec_todo;
my @pq = grep {$recommended{$_}} @q;
- print "recommended [@pq] among [@q]\n" if $expand_dbg;
+ print STDERR "recommended [@pq] among [@q]\n" if $expand_dbg;
@q = @pq if @pq;
}
if (@q > 1) {
@@ -1138,7 +1138,7 @@ sub expand {
next;
}
push @p, $q[0];
- print "added $q[0] because of $p:$r\n" if $expand_dbg;
+ print STDERR "added $q[0] because of $p:$r\n" if $expand_dbg;
$p{$q[0]} = 1;
$aconflicts{$_} = "conflict from project config with $q[0]" for @{$conflicts->{$q[0]} || []};
if (!$ignoreconflicts) {
@@ -1163,7 +1163,7 @@ sub expand {
@pamb = ();
todo2recommended($config, \%recommended, \@rec_todo) if @rec_todo;
$doamb = %recommended ? 2 : 3;
- print "now doing undecided dependencies, $doamb = $doamb\n" if $expand_dbg;
+ print STDERR "now doing undecided dependencies, $doamb = $doamb\n" if $expand_dbg;
next;
}
return undef, @error if @error;