From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qN6SO9MJwF8mcwAA0tVLHw (envelope-from ) for ; Thu, 26 Nov 2020 20:02:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qB1iN9MJwF8BYAAAB5/wlQ (envelope-from ) for ; Thu, 26 Nov 2020 20:02:27 +0000 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 A8DC4940483 for ; Thu, 26 Nov 2020 20:02:27 +0000 (UTC) Received: from localhost ([::1]:48726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiNTG-0004mw-MR for larch@yhetil.org; Thu, 26 Nov 2020 15:02:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiNSs-0004mL-1v for guix-patches@gnu.org; Thu, 26 Nov 2020 15:02:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59658) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiNSr-0000gr-QS for guix-patches@gnu.org; Thu, 26 Nov 2020 15:02:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiNSr-0004cp-OT for guix-patches@gnu.org; Thu, 26 Nov 2020 15:02:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44892] [PATCH] build: qt-build-system: Preserve existing variables when wrapping programs. Resent-From: Timotej Lazar Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Nov 2020 20:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44892 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44892@debbugs.gnu.org Cc: Timotej Lazar X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160642087717725 (code B ref -1); Thu, 26 Nov 2020 20:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Nov 2020 20:01:17 +0000 Received: from localhost ([127.0.0.1]:42971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiNS9-0004bp-40 for submit@debbugs.gnu.org; Thu, 26 Nov 2020 15:01:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:48092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiNS7-0004bh-0d for submit@debbugs.gnu.org; Thu, 26 Nov 2020 15:01:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiNS6-0004gv-P7 for guix-patches@gnu.org; Thu, 26 Nov 2020 15:01:14 -0500 Received: from araneo.si ([2001:15c0:2110:3400::2]:33486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiNS4-0000QP-Pq for guix-patches@gnu.org; Thu, 26 Nov 2020 15:01:14 -0500 Received: from araneo.si (localhost.lan [127.0.0.1]) by araneo.si (OpenSMTPD) with ESMTP id 80d62e8a for ; Thu, 26 Nov 2020 20:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=araneo.si; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=20180623; bh=nZN7/Q7exsv8syHrux0C6 OReG8s=; b=ODLs1z2GLEB2T5WtYOVmQPUomCyJEn1I5BLGHKW6qomGQjHXWlEAz e7ut6JH+ei9vW5t/ruqPOBnHonDUfQrFfwP04ghSTxkKZGzL9GFkPNEybS4s+T2N b14Zc/sElugHDLRRubzcuQ/pdkU2Lb0YlIvWasmOvvhL1M7vTLKfo6prseMrVKtq EZhpFzSRjdnOVfsv1Uq3kDQ2zWW7GrUkWZ8gxH14pANEtXORekcN8Qg3+RsnRsN9 a1ipRmogVHyAunBU1i7UBkkYLp39I2inbjjcKvWXL6gduLFT9nhsjNS9uYVRCeAY 3zLiKTzPsYnfViMnZHaFsWeS/H/UFQTgg== Received: by araneo.si (OpenSMTPD) with ESMTPSA id 138f9273 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 26 Nov 2020 20:01:07 +0000 (UTC) From: Timotej Lazar Date: Thu, 26 Nov 2020 20:59:42 +0100 Message-Id: <20201126195942.21200-1-timotej.lazar@araneo.si> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:15c0:2110:3400::2; envelope-from=timotej.lazar@araneo.si; helo=araneo.si 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=araneo.si header.s=20180623 header.b=ODLs1z2G; dmarc=fail reason="SPF not aligned (relaxed)" header.from=araneo.si (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 2.59 X-TUID: ShBVDnNotH+5 This ensures that any additional plugin and icon directories installed in the profile are found by the wrapped program. * guix/build/qt-build-system.scm (variables-for-wrapping): Use prefix instead of = for wrap-program. --- Hi, The qt-wrap phase sets environment variables (including XDG_DATA_DIRS and QT_PLUGIN_PATH) to ensure that required plugin and data directories are found at runtime. The current code uses = for wrap-program, which overrides any existing settings for those variables and prevents Qt from finding additional plugins and icons installed in the user’s profile. For instance, this prevented qpdfview from picking up the icon theme set by LXQt. This patch prepends paths to environment variables instead of overriding them, so that any paths that are already set are also searched. I used prefix instead of suffix so that the paths required by the program itself are considered first. I think but am not sure that this is the right approach. There are ~170 packages using qt-build-system, including some KDE libs that many other packages depend on, so this should probably be applied to staging. I checked that the patch works for a small sample of packages (kmines, lyx, quaternion, quassel, qpdfview, scantailor and zeal). Unfortunately I can’t easily rebuild KDE to test everything. Thanks! Timotej guix/build/qt-build-system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm index 005157b0a4..93f512b5d6 100644 --- a/guix/build/qt-build-system.scm +++ b/guix/build/qt-build-system.scm @@ -60,7 +60,7 @@ (lambda (var-to-wrap) (not (null? (last var-to-wrap)))) (map (lambda (var-spec) - `(,(first var-spec) = ,(collect-sub-dirs base-directories (last var-spec)))) + `(,(first var-spec) prefix ,(collect-sub-dirs base-directories (last var-spec)))) (list ;; these shall match the search-path-specification for Qt and KDE ;; libraries -- 2.29.2