[gimp] tools: only display "trouble reading […]" message when the script fails.



commit f22b82f22f32312df442f19b4a8f87501b89d30a
Author: Jehan <jehan girinstud io>
Date:   Mon Aug 1 17:07:30 2022 +0200

    tools: only display "trouble reading […]" message when the script fails.
    
    Displaying it all the time when we fail the first attempt is confusing
    as it is expected to fail in the meson build (since build libraries are
    in different folders). Instead only output the error message when both
    known paths failed, i.e. when we fail the script (and write down both
    attempted path in the error message).

 tools/defcheck.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/tools/defcheck.py b/tools/defcheck.py
index 3eeaf3168f..3a117d0a5f 100755
--- a/tools/defcheck.py
+++ b/tools/defcheck.py
@@ -85,11 +85,10 @@ for df in def_files:
                                             libname)
    if status != 0:
       libname_meson = path.join(directory, "lib" + basename + "-*.so")
-      print("trouble reading {} - trying {}".format(libname, libname_meson))
       status, nm = subprocess.getstatusoutput ("nm --defined-only --extern-only " +
                                                libname_meson)
       if status != 0:
-        print("trouble reading {} - has it been compiled?".format(libname_meson))
+        print("trouble reading {} or {} - has it been compiled?".format(libname, libname_meson))
         have_errors = -1
         continue
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]