diff mbox series

[bug#61780,1/3] gnu: tracker: Don't wrap binaries in libexec/tracker3 directory.

Message ID 2babe2e18dea3b16a62823437c820eba285c8961.camel@gmail.com
State New
Headers show
Series Fix Tracker and update it | expand

Commit Message

Liliana Marie Prikler Feb. 25, 2023, 6:46 a.m. UTC
These binaries are mere symlinks to the already wrapped tracker command.
They are used in a command lookup via argv[0], which wrapping them breaks.

* gnu/packages/gnome.scm (tracker)[#:phases]: Add ‘unwrap-libexec’.
---
 gnu/packages/gnome.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index ff53781b7c..dd9b80ea67 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -9707,7 +9707,18 @@  (define-public tracker
                ;; Some tests expect to write to $HOME.
                (setenv "HOME" "/tmp")
                (apply invoke "dbus-run-session" "--" "meson" "test"
-                      "--print-errorlogs" test-options)))))))
+                      "--print-errorlogs" test-options))))
+         (add-after 'glib-or-gtk-wrap 'unwrap-libexec
+           (lambda* (#:key outputs #:allow-other-keys)
+             (with-directory-excursion (string-append (assoc-ref outputs "out")
+                                                      "/libexec/tracker3")
+               (for-each
+                (lambda (f)
+                  (let ((real (string-append "." (basename f) "-real")))
+                    (when (file-exists? real)
+                      (delete-file f)
+                      (rename-file real f))))
+                (find-files "."))))))))
     (native-inputs
      (list gettext-minimal
            `(,glib "bin")