all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#67505] [PATCH] build/go: Don't use set!
@ 2023-11-28 10:24 Efraim Flashner
  2023-12-03 22:49 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Efraim Flashner @ 2023-11-28 10:24 UTC (permalink / raw)
  To: 67505; +Cc: Efraim Flashner, Katherine Cox-Buday

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(-)

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)

base-commit: 62376e3eb67644454bc655bed56be4be965bd13e
-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-06 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28 10:24 [bug#67505] [PATCH] build/go: Don't use set! Efraim Flashner
2023-12-03 22:49 ` Ludovic Courtès
2023-12-04  9:53   ` bug#67505: " Efraim Flashner
2023-12-06 12:27     ` [bug#67505] " Efraim Flashner

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.