Subject: guix: build-system: gnu: Avoid warnings from "libtool finish"

From: Dave Love <[email-masked]>
Date: Thu, 27 Jul 2017 15:40:33 +0100

The "ldconfig not found" warnings confused me, and caused a bug report
previously.

From d6f42badc39679dd36ea8f582140a7d63316d101 Mon Sep 17 00:00:00 2001
From: Dave Love <[email-masked]>
Date: Thu, 27 Jul 2017 15:35:53 +0100
Subject: [PATCH] guix: build-system: gnu: Avoid warnings from "libtool
 finish".

* guix/build/gnu-build-system.scm (configure): Avoid warnings from
libtool invoking ldconfig.
---
 guix/build/gnu-build-system.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 1786e2e3c..508699497 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -271,9 +271,15 @@ makefiles."
     ;; Call `configure' with a relative path.  Otherwise, GCC's build system
     ;; (for instance) records absolute source file names, which typically
     ;; contain the hash part of the `.drv' file, leading to a reference leak.
-    (zero? (apply system* bash
-                  (string-append srcdir "/configure")
-                  flags))))
+    (and (zero? (apply system* bash
+                       (string-append srcdir "/configure")
+                       flags))
+         ;; Avoid warnings about from "libtool finish" about not finding
+         ;; ldconfig.
+         (if (file-exists? "libtool")
+             (begin (substitute* "libtool" (("ldconfig") ":"))
+                    #t)
+             #t))))
 
 (define* (build #:key (make-flags '()) (parallel-build? #t)
                 #:allow-other-keys)
-- 
2.11.0