On 10/22/25 13:18, Pádraig Brady wrote:
On 22/10/2025 07:21, Bernhard Voelker wrote:
This yields:

     $ src/ginstall src/install.c foo -s   # with a non-working strip in PATH
     ginstall: cannot run 'strip': Exec format error

     $ src/ginstall src/install.c foo -s --strip-program=./README
     ginstall: cannot run strip program './README': Permission denied

Cool, that's a little better.
Please push.

Thanks.

I noticed that the proposed diff would be problematic for the translators,
so I'll push the clearer version attached.

Have a nice day,
Berny
From 157d7f96c7785eb428e812ecd97761897246533c Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <[email protected]>
Date: Thu, 23 Oct 2025 09:33:22 +0200
Subject: [PATCH] install: enhance error diagnostic when running strip fails

* src/install.c (strip): Mention explicitly that the strip program
failed in the case the user specified a custom strip program name.
---
 src/install.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/install.c b/src/install.c
index 9cb13d429..26bc16e11 100644
--- a/src/install.c
+++ b/src/install.c
@@ -518,7 +518,13 @@ strip (char const *name)
 
   bool ok = false;
   if (result != 0)
-    error (0, result, _("cannot run %s"), quoteaf (strip_program));
+    {
+      error (0, result,
+             streq (strip_program, "strip")
+               ? _("cannot run %s")
+               : _("cannot run strip program %s"),
+             quoteaf (strip_program));
+    }
   else
     {
       /* Wait for 'strip' to complete, and emit a warning message on failure  */
-- 
2.51.0

Reply via email to