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