pack: Dereference symlinks when looking for executables.
authorLudovic Courtès <ludo@gnu.org>
Mon, 29 Jun 2020 20:57:12 +0000 (22:57 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 29 Jun 2020 22:18:28 +0000 (00:18 +0200)
Fixes <https://bugs.gnu.org/42127>.
Reported by Andrius Štikonas <andrius@stikonas.eu>.

* guix/scripts/pack.scm (wrapped-package)[build]: Add trailing slash to
the arguments to 'find-files'.

guix/scripts/pack.scm

index e0f9cc1..5bd405a 100644 (file)
@@ -836,9 +836,10 @@ last resort for relocation."
                     (scandir input))
 
           (for-each build-wrapper
-                    (append (find-files (string-append input "/bin"))
-                            (find-files (string-append input "/sbin"))
-                            (find-files (string-append input "/libexec")))))))
+                    ;; Note: Trailing slash in case these are symlinks.
+                    (append (find-files (string-append input "/bin/"))
+                            (find-files (string-append input "/sbin/"))
+                            (find-files (string-append input "/libexec/")))))))
 
   (computed-file (string-append
                   (cond ((package? package)