Message ID | 92508cd851b013f54a799350082f49b157c7aebf.1701167049.git.efraim@flashner.co.il |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2BDFB27BBEA; Tue, 28 Nov 2023 10:28:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EA3E927BBE2 for <patchwork@mira.cbaines.net>; Tue, 28 Nov 2023 10:28:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1r7vJu-0003DD-4p; Tue, 28 Nov 2023 05:27:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r7vJr-0003D4-Pi for guix-patches@gnu.org; Tue, 28 Nov 2023 05:27:56 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r7vJr-0002U9-HQ for guix-patches@gnu.org; Tue, 28 Nov 2023 05:27:55 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r7vJy-00019u-9p; Tue, 28 Nov 2023 05:28:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67505] [PATCH] build/go: Don't use set! Resent-From: Efraim Flashner <efraim@flashner.co.il> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: cox.katherine.e+guix@gmail.com, guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 10:28:02 +0000 Resent-Message-ID: <handler.67505.B.17011672654429@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67505 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67505@debbugs.gnu.org Cc: Efraim Flashner <efraim@flashner.co.il>, Katherine Cox-Buday <cox.katherine.e+guix@gmail.com> X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Katherine Cox-Buday <cox.katherine.e+guix@gmail.com> Received: via spool by submit@debbugs.gnu.org id=B.17011672654429 (code B ref -1); Tue, 28 Nov 2023 10:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Nov 2023 10:27:45 +0000 Received: from localhost ([127.0.0.1]:45469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1r7vJg-00019N-KU for submit@debbugs.gnu.org; Tue, 28 Nov 2023 05:27:45 -0500 Received: from lists.gnu.org ([2001:470:142::17]:37256) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <efraim.flashner@gmail.com>) id 1r7vJb-000193-J9 for submit@debbugs.gnu.org; Tue, 28 Nov 2023 05:27:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <efraim.flashner@gmail.com>) id 1r7vJP-00037V-EW for guix-patches@gnu.org; Tue, 28 Nov 2023 05:27:27 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <efraim.flashner@gmail.com>) id 1r7vJN-0002MV-N7 for guix-patches@gnu.org; Tue, 28 Nov 2023 05:27:27 -0500 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a00a9c6f1e9so752115366b.3 for <guix-patches@gnu.org>; Tue, 28 Nov 2023 02:27:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701167244; x=1701772044; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=L6S8x7w6ibOrBDxNQ7NMBxG+c/tpisxBk++63pwjBR8=; b=FLmOR75YlosXjrZ3t/dCmAFIkd/bSu4ibsPhKlVCm9uB9Ta5rJQjZr9O+JFF3Bdyhc IfJuqcF6E18BbzdudqzzKOKiWa6NPlTO8mcHzXL5kbIQD1rqQzdHSe0fAZ1B+2NND/dw EKKTvAP8G/bThSpT2AIz5z4gKOsEl8bhvl2MmxevNTqntCBqCJKtCo77gMk7/xFlBInX oeL7smt2JNnuRciK8Twn6jfmSH7HBkkcctyVss6jOyj52L6ahj99XcA8hkcGAIQMud78 9CtiBFwCE2Hf+WKTN/iF1BJFpYOIGbSLYLc09keVNdvjEBYzpDyVDYrhbhk2Pwsc+ONE CdDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701167244; x=1701772044; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=L6S8x7w6ibOrBDxNQ7NMBxG+c/tpisxBk++63pwjBR8=; b=NNPKSU1S68vfyEWMC8liCPbkAZusBDGkmbknhzX8Rr9QkpWwST6XK4IgXhSDSQ3Pkt c/6TK05Be1YCje49HTGAHHBuQjgTiIx7VoaSv9cT6mnfeVdCgUnUHgpebNtf190vEZiu ew5rTE85ow5u3FjtXvn/TQkHFRD4XOfKruCKOSgl4VXmybVVmVkuFsKhD7xZMUXtd/qN HpHZ+Rvk3dmpKu6AcsrqijjIYVsSPN/1sAkRfTaaD/BrlpuqYWtCYCuxN+KDiiIx4LNO lrsBsSQl+GdcQBmwZZTgJo1WkvHyI+Zlo/IXMefoFkiDo8UJGE+FRyv+3hnTxK2+olbk T+lA== X-Gm-Message-State: AOJu0Yxr+w/dQ2jNHajenXYuIzkkwE35aRJECORv62JEv/mA0fopILAA rIuqWg2zOTw/jLP0wQWqZ4JUX0Gdo79dXw== X-Google-Smtp-Source: AGHT+IGJD85hSKA5A9nAXPsPAOd0stoElocPPO/cGFPhDaEvH/WLa6QgZT7FRq3rUJOke5Qwno9xxw== X-Received: by 2002:a17:906:3f92:b0:9e0:4910:166a with SMTP id b18-20020a1709063f9200b009e04910166amr8822915ejj.32.1701167244102; Tue, 28 Nov 2023 02:27:24 -0800 (PST) Received: from localhost ([176.12.138.93]) by smtp.gmail.com with ESMTPSA id si12-20020a170906cecc00b009fca9f39e98sm6653325ejb.26.2023.11.28.02.27.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 02:27:23 -0800 (PST) From: Efraim Flashner <efraim@flashner.co.il> Date: Tue, 28 Nov 2023 12:24:15 +0200 Message-ID: <92508cd851b013f54a799350082f49b157c7aebf.1701167049.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=efraim.flashner@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#67505] build/go: Don't use set!
|
|
Commit Message
Efraim Flashner
Nov. 28, 2023, 10:24 a.m. UTC
This causes build failures on powerpc-linux. * guix/build/go-build-system.scm (unpack): When the unpack-path is unset use the import-path but don't redefine the unpack-path. Change-Id: I2b5a36eb738abb14307941d388038139dbaf2bdf --- I checked the rest of the build code in (guix build go-build-system) and I didn't see anywhere that didn't also check to make sure the unpack-path wasn't empty. I have yet to create a minimal reproducer for the set! issue on powerpc-linux but this is the only change preventing building go packages on powerpc-linux (the 32-bit ones, not powerpc64le-linux). guix/build/go-build-system.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) base-commit: 62376e3eb67644454bc655bed56be4be965bd13e
Comments
Efraim Flashner <efraim@flashner.co.il> skribis: > This causes build failures on powerpc-linux. > > * guix/build/go-build-system.scm (unpack): When the unpack-path is unset > use the import-path but don't redefine the unpack-path. > > Change-Id: I2b5a36eb738abb14307941d388038139dbaf2bdf [...] > - (when (string-null? unpack-path) > - (set! unpack-path import-path)) > - (let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path))) > + (let ((dest (string-append (getenv "GOPATH") "/src/" > + (if (string-null? unpack-path) > + import-path > + unpack-path)))) Could you adjust indentation of the ‘if’ arms? Otherwise LGTM, thanks! Ludo’.
On Sun, Dec 03, 2023 at 11:49:03PM +0100, Ludovic Courtès wrote: > Efraim Flashner <efraim@flashner.co.il> skribis: > > > This causes build failures on powerpc-linux. > > > > * guix/build/go-build-system.scm (unpack): When the unpack-path is unset > > use the import-path but don't redefine the unpack-path. > > > > Change-Id: I2b5a36eb738abb14307941d388038139dbaf2bdf > > [...] > > > - (when (string-null? unpack-path) > > - (set! unpack-path import-path)) > > - (let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path))) > > + (let ((dest (string-append (getenv "GOPATH") "/src/" > > + (if (string-null? unpack-path) > > + import-path > > + unpack-path)))) > > Could you adjust indentation of the ‘if’ arms? > > Otherwise LGTM, thanks! Done. Patch pushed!
On Mon, Dec 04, 2023 at 11:53:58AM +0200, Efraim Flashner wrote: > On Sun, Dec 03, 2023 at 11:49:03PM +0100, Ludovic Courtès wrote: > > Efraim Flashner <efraim@flashner.co.il> skribis: > > > > > This causes build failures on powerpc-linux. > > > > > > * guix/build/go-build-system.scm (unpack): When the unpack-path is unset > > > use the import-path but don't redefine the unpack-path. > > > > > > Change-Id: I2b5a36eb738abb14307941d388038139dbaf2bdf > > > > [...] > > > > > - (when (string-null? unpack-path) > > > - (set! unpack-path import-path)) > > > - (let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path))) > > > + (let ((dest (string-append (getenv "GOPATH") "/src/" > > > + (if (string-null? unpack-path) > > > + import-path > > > + unpack-path)))) > > > > Could you adjust indentation of the ‘if’ arms? > > > > Otherwise LGTM, thanks! > > Done. Patch pushed! Patch re-opened. I reverted it since it caused ~4800 package builds on Berlin. I'll probably carry it locally for now (I'm almost certainly the only one affected) and we can apply it another time something touches go.
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 7f25e05d0d..d32235bf5a 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> -;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2020, 2021, 2023 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev> ;;; ;;; This file is part of GNU Guix. @@ -227,9 +227,10 @@ (define* (unpack #:key source import-path unpack-path #:allow-other-keys) (when (string-null? import-path) (display "WARNING: The Go import path is unset.\n")) - (when (string-null? unpack-path) - (set! unpack-path import-path)) - (let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path))) + (let ((dest (string-append (getenv "GOPATH") "/src/" + (if (string-null? unpack-path) + import-path + unpack-path)))) (mkdir-p dest) (if (file-is-directory? source) (copy-recursively source dest #:keep-mtime? #t)