GNU bug report logs - #53334
qbittorrent(<=4.4.0)'s search window fails with "Python is required to use the search engine but it does not seem to be installed"

Previous Next

Package: guix;

Reported by: Jacob Hrbek <kreyren <at> rixotstudio.cz>

Date: Tue, 18 Jan 2022 03:01:01 UTC

Severity: normal

Merged with 43184

Full log


Message #11 received at 53334 <at> debbugs.gnu.org (full text, mbox):

From: Jacob Hrbek <kreyren <at> rixotstudio.cz>
To: 53334 <at> debbugs.gnu.org
Cc: Jacob Hrbek <kreyren <at> rixotstudio.cz>
Subject: [PATCH] qbittorrent: Phase patch to use full nix path for python-gate
 to avoid "Missing Python Runtime" failure on search engine
Date: Tue, 18 Jan 2022 03:16:52 +0000
[Message part 1 (text/plain, inline)]
Fixes: https://issues.guix.gnu.org/53334

Signed-off-by: Jacob Hrbek <kreyren <at> rixotstudio.cz>
---
 gnu/packages/bittorrent.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index fa88c91163..f222b87692 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -491,6 +491,13 @@ (define-public qbittorrent
                            (guix build qt-utils))
        #:phases
        (modify-phases %standard-phases
+         ;; The package is checking for a `python` or `python3` executable in an environment variable `PATH` which causes the search engine to fail with "Missing Python Runtime" this phase substitutes the python executables with full path in the nix store executable -- https://issues.guix.gnu.org/53334
+	 ;; FIXME-QA(Krey): This codeblock depends on upstream's declaration of https://github.com/qbittorrent/qBittorrent/blob/master/src/base/utils/foreignapps.cpp#L277, if the fi
le declaration changes then this phase will be malfunction -> Consider optimizing the upstream code for nix userland
+	 (add-after 'unpack 'python-path-compat
+           (lambda* (#:key inputs #:allow-other-keys)
+	     (substitute* "src/base/utils/foreignapps.cpp"
+	       (("if \\(testPythonInstallation\\(\"python3\", pyInfo\\)\\)")
+		 (string-append "if (testPythonInstallation(\"" (search-input-file inputs "/bin/python") "\", pyInfo))")))))
          (add-after 'install 'wrap-qt
            (lambda* (#:key outputs inputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
--
2.34.0

[publickey - kreyren@rixotstudio.cz - 1677db82.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.