rpm/rpm-4.8.1-getoutput-emsg.patch

29 lines
904 B
Diff
Raw Normal View History

From 5711982e27c70bea4017632255a94630ea10d1ab Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Wed, 30 Jun 2010 12:27:56 +0300
Subject: [PATCH 2/2] Make the infamous getOutputFrom() error message more useful
- ...like actually saying what was the failing script, doh
- leaving the function name there for a googling hint
---
build/rpmfc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/build/rpmfc.c b/build/rpmfc.c
index e76363a..3c915f5 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -234,7 +234,8 @@ top:
if ((nbw = write(toProg[1], writePtr,
(1024<writeBytesLeft) ? 1024 : writeBytesLeft)) < 0) {
if (errno != EAGAIN) {
- perror("getOutputFrom()");
+ rpmlog(RPMLOG_ERR, _("%s: failure writing to %s: %m\n"),
+ __func__, argv[0]);
exit(EXIT_FAILURE);
}
nbw = 0;
--
1.7.0.1