From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KJzQFZMt5mHfPwAAgWs5BA (envelope-from ) for ; Tue, 18 Jan 2022 04:01:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WCN7DpMt5mFBLQAAG6o9tA (envelope-from ) for ; Tue, 18 Jan 2022 04:01:39 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D311F15192 for ; Tue, 18 Jan 2022 04:01:38 +0100 (CET) Received: from localhost ([::1]:36166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9ekb-0004xT-N6 for larch@yhetil.org; Mon, 17 Jan 2022 22:01:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9ek2-0004x5-B3 for bug-guix@gnu.org; Mon, 17 Jan 2022 22:01:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9ek2-0000nV-0j for bug-guix@gnu.org; Mon, 17 Jan 2022 22:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n9ek1-0007vH-Vh for bug-guix@gnu.org; Mon, 17 Jan 2022 22:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#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" Resent-From: Jacob Hrbek Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 18 Jan 2022 03:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53334 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 53334@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164247484129040 (code B ref -1); Tue, 18 Jan 2022 03:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2022 03:00:41 +0000 Received: from localhost ([127.0.0.1]:48518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ejg-0007Xf-CE for submit@debbugs.gnu.org; Mon, 17 Jan 2022 22:00:41 -0500 Received: from lists.gnu.org ([209.51.188.17]:37808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9ejb-0007S3-Ha for submit@debbugs.gnu.org; Mon, 17 Jan 2022 22:00:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9ejb-0004ue-8o for bug-guix@gnu.org; Mon, 17 Jan 2022 22:00:35 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:38083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9ejV-0000er-CL for bug-guix@gnu.org; Mon, 17 Jan 2022 22:00:32 -0500 Date: Tue, 18 Jan 2022 03:00:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rixotstudio.cz; s=protonmail2; t=1642474818; bh=19RDRRGKQocihDwUFuRULvUehNqBeAuNZ03P8nUpSHk=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=g46l4XtTCXXPcCQhJAq9LT5TP0VDGKkvgxpFkBDEzlELiCgncdVXlD1QTRhcazDEO wR9XxNu+p8RYFpI3NwPH+8lUh1I45amWzYziknU+C91u24Or2/iQiHEYe5jUST9BHU NYfEoiPxEeSByJ3pNqDNwp+wDvpJ8NZYFyKEfrZUi2iYYf415F7V84KAWF2JSzWe5Y OO7T0YERMZ5sqDv02DU7kNm4KxPqTPj3OLJQdz5RrEZPPkYYKJSNPlBE7ExlhenByI BfPqKPfvToXQaLLvOtGHK8EWBY6svFP5p8oQjMoIg8cXKd4mvU110Pat18bq8FMpcM bTghT7yAQOxKg== From: Jacob Hrbek Message-ID: <43f27323-66b8-d72b-9ab5-062c5a27a72b@rixotstudio.cz> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha256; boundary="------e34c8c165b144721552d49f4bbb0daefb66add24bef09b7ae2f6f557bcccecf3"; charset=utf-8 Received-SPF: pass client-ip=185.70.43.23; envelope-from=kreyren@rixotstudio.cz; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jacob Hrbek Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642474899; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=19RDRRGKQocihDwUFuRULvUehNqBeAuNZ03P8nUpSHk=; b=V4JSH1moOZDZxEFev9uwRCi8Cxqdw3bRPYQXWemE+yqkObyfUo6cINFiydOxyyrZl+mJrq uJThg3vpqxssM4Bb8vHccTwnpPt0f44DI1b5Pij19rTsh6DFwxcdPtjJU6FODC85bHH2sf 3eU0WSauKRbZzDvnhtnTI8TvniIwS0b8LMgCjC2Lzj9ScqsVqfUt/2BmlOo2GWy7b4mILG eVnzWQq1HfNfeU24usE4dIn9HF8T6YgVqZguF8OI+8WB8KBZVutZ6ndhGE6rK861GnQtph TcsTQnAdpmVFlhuBXnWkstMN77UMkjh8Nyspg+g6WM+Llh2bG8VGQ5eyO3itkQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642474899; a=rsa-sha256; cv=none; b=i+4u/H+3UapSaOUtNvcDS47lwU9LoGcbXpzs0Jv3oNlXqr0b3VVp09VenKbyEh0Su02alA 3jizkdUE05nai7fWBGviH/AsDRljeOOAcr+NWSJBYR6pWIZBysTYI35Vphpg+mUc+jcfYH 0Vg1KYVfqJBu41+2YeccuOEgE3tnGHlXOLHIU88vUQVgm2jPtoXTe8+0P/pcTpVrph1ZBh fKNCrE9sbhO0adit+/BTIOyWwOXXQzpZlXmW2PDbsaGHSsDk1sPdle3Wg9kc1FLqW4ooar VPdjp6D+0cMkIgwY4IQ27b+9tyMrjBUadaBlCXZczoLatdbhDw/rZMFW21NcOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rixotstudio.cz header.s=protonmail2 header.b=g46l4XtT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=rixotstudio.cz (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.22 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rixotstudio.cz header.s=protonmail2 header.b=g46l4XtT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=rixotstudio.cz (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D311F15192 X-Spam-Score: -4.22 X-Migadu-Scanner: scn1.migadu.com X-TUID: A7uY4Q6PY5e9 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------e34c8c165b144721552d49f4bbb0daefb66add24bef09b7ae2f6f557bcccecf3 Content-Type: multipart/mixed; boundary=4d1a07e3b031f8e3e9604f0c7797379f86486714db0257fde945bad61404 Message-ID: <43f27323-66b8-d72b-9ab5-062c5a27a72b@rixotstudio.cz> Date: Tue, 18 Jan 2022 04:00:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: bug-guix@gnu.org From: Jacob Hrbek Subject: 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" --4d1a07e3b031f8e3e9604f0c7797379f86486714db0257fde945bad61404 Content-Disposition: Content-Type: multipart/alternative; boundary="------------iABPy2u8txwMe2yb0zeW6jkd" --------------iABPy2u8txwMe2yb0zeW6jkd Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit qbittorrent <=4.4.0 (current latest version) fails with: ``` Missing Python Runtime Python is required to use the search engine but it does not seem to be installed ``` which is triggered from `qbittorrent/src/gui/mainwindow.cpp`: ```cpp /*https://github.com/qbittorrent/qBittorrent/blob/00f6bb7c8225285a7929426187a1513d247b582b/src/gui/mainwindow.cpp#L1847 */ void MainWindow::on_actionSearchWidget_triggered() { if (!m_hasPython && m_ui->actionSearchWidget->isChecked()) { const Utils::ForeignApps::PythonInfo pyInfo = Utils::ForeignApps::pythonInfo(); // Not installed if (!pyInfo.isValid()) { m_ui->actionSearchWidget->setChecked(false); Preferences::instance()->setSearchEnabled(false); #ifdef Q_OS_WIN const QMessageBox::StandardButton buttonPressed = QMessageBox::question(this, tr("Missing Python Runtime") , tr("Python is required to use the search eng ine but it does not seem to be installed.\nDo you want to install it now?") , (QMessageBox::Yes | QMessageBox::No), QMessageBox::Yes); if (buttonPressed == QMessageBox::Yes) installPython(); #else QMessageBox::information(this, tr("Missing Python Runtime") , tr("Python is required to use the search engine but it does not seem to be installed.")); #endif return; } // Check version requirement if (!pyInfo.isSupportedVersion()) { m_ui->actionSearchWidget->setChecked(false); Preferences::instance()->setSearchEnabled(false); #ifdef Q_OS_WIN const QMessageBox::StandardButton buttonPressed = QMessageBox::question(this, tr("Old Python Runtime") , tr("Your Python version (%1) is outdated. Minimum requirement: %2.\nDo you want to install a newer version now?") .arg(pyInfo.ve rsion, QLatin1String("3.5.0")) , (QMessageBox::Yes | QMessageBox::No), QMessageBox::Yes); if (buttonPressed == QMessageBox::Yes) installPython(); #else QMessageBox::information(this, tr("Old Python Runtime") , tr("Your Python version (%1) is outdated. Please upgrade to latest version for search engines to work.\nMinimum requirement: %2.") .arg(pyInfo.version, QLatin1String("3.5.0"))); #endif return; } m_hasPython = true; m_ui->actionSearchWidget->setChecked(true); Preferences::instance()->setSearchEnabled(true); } displaySearchTab(m_ui->actionSearchWidget->isChecked()); } ``` To call `Utils::ForeignApps::pythonInfo()` definition in `qbittorrent/src/base/utils/foreignapps.cpp` as: ```cpp /*https://github.com/qbittorrent/qBittorrent/blob/5c0378a6845e3484023f4c76893ff9f0e5178460/src/base/utils/foreignapps.c pp#L272 */ PythonInfo Utils::ForeignApps::pythonInfo() { static PythonInfo pyInfo; if (!pyInfo.isValid()) { if (testPythonInstallation("python3", pyInfo)) return pyInfo; if (testPythonInstallation("python", pyInfo)) return pyInfo; #if defined(Q_OS_WIN) if (testPythonInstallation(findPythonPath(), pyInfo)) return pyInfo; #endif LogMsg(QCoreApplication::translate("Utils::ForeignApps", "Python not detected"), Log::INFO); } return pyInfo; } ``` Where: ```cpp if (testPythonInstallation("python3", pyInfo)) ... ``` Is important as it's checking for a `python3` (or `python`) executable in PATH that is not provided by guix's build procedure -> The package has compatibility issues with GNU Guix and has to be patched. ### Steps to reproduce: 0. Get qbittorrent on GNU Guix 1. Open the GUI: View > Search engine and observe the highlighted error pre venting to use the search engine functionality Relevants: R1. https://github.com/qbittorrent/qBittorrent/issues/16139 -- Jacob Hrbek --------------iABPy2u8txwMe2yb0zeW6jkd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

qbittorrent <=4.4.0 (current latest version) fails with:

```
Missing Python Runtime

Python is required to use the search engine but it does not seem to be installed
```

which is triggered from `qbittorrent/src/gui/mainwindow.cpp`:

```cpp

/* https://github.com/qbittorrent/qBittorrent/blob/00f6bb7c8225285a7929426187a1513d247b582b/src/gui/mainwindow.cpp#L1847 */
void MainWindow::on_actionSearchWidget_triggered()
{
    if (!m_hasPython && m_ui->actionSearchWidget->isChecked())
    {
        const Utils::ForeignApps::PythonInfo pyInfo = Utils::ForeignApps::pythonI
nfo();

        // Not installed
        if (!pyInfo.isValid())
        {
            m_ui->actionSearchWidget->setChecked(false);
            Preferences::instance()->setSearchEnabled(false);

#ifdef Q_OS_WIN
            const QMessageBox::StandardButton buttonPressed = QMessageBox::question(this, tr("Missing Python Runtime")
                , tr("Python is required to use the search engine but it does not seem to be installed.\nDo you want to install it now?")
                , (QMessageBox::Yes | QMessageBox::No), QMessageBox::Yes);
            if (buttonPressed == QMessageBox::Yes)
                installPython();
#else
            QMessageBox::information(this, tr("Missing Python Runtime")
                , tr("Python is required to use the search engine but it does not seem to be installed."));
#endif
            return;
        }

        // Check version requirement
        if (!pyInfo.isSupportedVersion())
        {
            m_ui->
;actionSearchWidget->setChecked(false);
            Preferences::instance()->setSearchEnabled(false);

#ifdef Q_OS_WIN
            const QMessageBox::StandardButton buttonPressed = QMessageBox::question(this, tr("Old Python Runtime")
                , tr("Your Python version (%1) is outdated. Minimum requirement: %2.\nDo you want to install a newer version now?")
                    .arg(pyInfo.version, QLatin1String("3.5.0"))
                , (QMessageBox::Yes | QMessageBox::No), QMessageBox::Yes);
            if (buttonPressed == QMessageBox::Yes)
                installPython();
#else
            QMessageBox::information(this, tr("Old Python Runtime")
                , tr("Your Python version (%1) is outdated. Please upgrade to latest version for search engines to work.\nMinimum requirement: %2.")
                .arg(pyInfo.version, QLatin1String("3.5.0")));
#endif
            return;
        }

        m_hasPython = true;

    m_ui->actionSearchWidget->setChecked(true);
        Preferences::instance()->setSearchEnabled(true);
    }

    displaySearchTab(m_ui->actionSearchWidget->isChecked());
}
```

To call `Utils::ForeignApps::pythonInfo()` definition in `qbittorrent/src/base/utils/foreignapps.cpp` as:

```cpp

/* https://github.com/qbittorrent/qBittorrent/blob/5c0378a6845e3484023f4c76893ff9f0e5178460/src/base/utils/foreignapps.cpp#L272 */
PythonInfo Utils::ForeignApps::pythonInfo()
{
    static PythonInfo pyInfo;
    if (!pyInfo.isValid())
    {
        if (testPythonInstallation("python3", pyInfo))
            return pyInfo;

        if (testPythonInstallation("python", pyInfo))
            return pyInfo;

#if defined(Q_OS_WIN)
        if (tes
tPythonInstallation(findPythonPath(), pyInfo))
            return pyInfo;
#endif

        LogMsg(QCoreApplication::translate("Utils::ForeignApps", "Python not detected"), Log::INFO);
    }

    return pyInfo;
}
```

Where:

```cpp
if (testPythonInstallation("python3", pyInfo)) ...
```

Is important as it's checking for a `python3` (or `python`) executable in PATH that is not provided by guix's build procedure -> The package has compatibility issues with GNU Guix and has to be patched.


### Steps to reproduce:
0. Get qbittorrent on GNU Guix
1. Open the GUI: View > Search engine and observe the highlighted error preventing to use the search engine functionality

Relevants:
R1. https://github.com/qbittorrent/qBittorrent/issues/16139

--
Jacob Hrbek
--------------iABPy2u8txwMe2yb0zeW6jkd-- --4d1a07e3b031f8e3e9604f0c7797379f86486714db0257fde945bad61404 Content-Transfer-Encoding: base64 Content-Disposition: attachment; name="publickey - kreyren@rixotstudio.cz - 1677db82.asc"; filename="publickey - kreyren@rixotstudio.cz - 1677db82.asc" Content-Type: application/pgp-keys; name="publickey - kreyren@rixotstudio.cz - 1677db82.asc"; filename="publickey - kreyren@rixotstudio.cz - 1677db82.asc" LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEdvcGVuUEdQIDIu Mi4yCkNvbW1lbnQ6IGh0dHBzOi8vZ29wZW5wZ3Aub3JnCgp4ak1FWUFsM0ZoWUpLd1lCQkFIYVJ3 OEJBUWRBUUtBcG1kUjh0RzlhS0VkeHdISi9aS08yQ3ZaTVJXUHRCTk5HCnFKVWhwMkxOTDJ0eVpY bHlaVzVBY21sNGIzUnpkSFZrYVc4dVkzb2dQR3R5WlhseVpXNUFjbWw0YjNSemRIVmsKYVc4dVkz byt3bzhFRUJZS0FDQUZBbUFKZHhZR0N3a0hDQU1DQkJVSUNnSUVGZ0lCQUFJWkFRSWJBd0llQVFB aApDUkN0MDMwVXEwTDhxUlloQkJaMzI0S1RqS2hsYzRFakI2M1RmUlNyUXZ5cDU3UUEvMHRsYmRu Q0l6cmVLWG12ClcyWFNZWHpBSm90SmR4Q3pFK1hBVE0rcVBES3pBUUNjYkhwN3l3NitBcm5nZVN0 R0ZuL29saHhUUGRwdTY0MUMKTEdpZ1BtRW9CYzQ0QkdBSmR4WVNDaXNHQVFRQmwxVUJCUUVCQjBE YWlJM2pRZlNvaTNEWjQvTmZteEdkc1Jzdgo5L0JxTWdXNWo2amRCcWt5SUFNQkNBZkNlQVFZRmdn QUNRVUNZQWwzRmdJYkRBQWhDUkN0MDMwVXEwTDhxUlloCkJCWjMyNEtUaktobGM0RWpCNjNUZlJT clF2eXBIY0VCQU9ReFMvSi9VTTBlZThrMmpibGlXZC9RMElkK1g4VUgKQlhoeXFWUmMyMnFyQVFE TEhjVzk3V1FiU0pGbzE5a3d0NzBPeUhlcEY2TFdwREQwUHVJU1pENklDZz09Cj05a1pnCi0tLS0t RU5EIFBHUCBQVUJMSUMgS0VZIEJMT0NLLS0tLS0= --4d1a07e3b031f8e3e9604f0c7797379f86486714db0257fde945bad61404-- --------e34c8c165b144721552d49f4bbb0daefb66add24bef09b7ae2f6f557bcccecf3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYIACcFAmHmLTwJkK3TfRSrQvypFqEEFnfbgpOMqGVzgSMHrdN9FKtC /KkAALx5AQD1b2Y7i3H0kd4GrRB0Pii3tcEJq/aqR+hIVmhgPsZNtQD/Q23P Mh+QcVsbd2meD78W9/zCtXAL7it/jm5Kxlb5RAE= =rgLP -----END PGP SIGNATURE----- --------e34c8c165b144721552d49f4bbb0daefb66add24bef09b7ae2f6f557bcccecf3--