qemu/minikconf-print-error-entirely-on-stderr.patch

39 lines
1.6 KiB
Diff
Raw Normal View History

From f95f7e74c6b8e656a3217508706db8c7f3c84e6d Mon Sep 17 00:00:00 2001
From: guping <guping_yewu@cmss.chinamobile.com>
Date: Tue, 8 Oct 2024 01:21:07 +0000
Subject: [PATCH] minikconf: print error entirely on stderr cherry-pick from
f9423e9f0ad14b186c65d6eb207438d2eddd24ea
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
While debugging an invalid configuration, I noticed that the clauses debug
ends up on stderr but the header ("The following clauses were found..."
ends up on stdout. This makes the contents of meson-logs/meson-log.txt
a bit confusing.
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: guping <guping_yewu@cmss.chinamobile.com>
---
scripts/minikconf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/minikconf.py b/scripts/minikconf.py
index bcd91015d3..6f7f43b291 100644
--- a/scripts/minikconf.py
+++ b/scripts/minikconf.py
@@ -112,7 +112,7 @@ def has_value(self):
def set_value(self, val, clause):
self.clauses_for_var.append(clause)
if self.has_value() and self.value != val:
- print("The following clauses were found for " + self.name)
+ print("The following clauses were found for " + self.name, file=sys.stderr)
for i in self.clauses_for_var:
print(" " + str(i), file=sys.stderr)
raise KconfigDataError('contradiction between clauses when setting %s' % self)
--
2.41.0.windows.1