unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: cage <cage-dev@twistfold.it>, 46826@debbugs.gnu.org
Subject: bug#46826: [debian] compilation from git fails
Date: Mon, 01 Mar 2021 12:42:08 +0100	[thread overview]
Message-ID: <35e9878676026fc49a7216083acebfae50f8bc23.camel@telenet.be> (raw)
In-Reply-To: <YDtONnEKLCe7pBEE@kurosawa.casa.net>


[-- Attachment #1.1: Type: text/plain, Size: 1122 bytes --]

On Sun, 2021-02-28 at 09:03 +0100, cage wrote:

> [...]
> A    kind     user    suggested    to    comment     the    form    in
> guix/scripts/environment.scm starting at line 178:
> 
> ------------
> (when (and profile
>   (> (length (manifest-entries manifest-from-opts)) 0))
>    (leave (G_ "'--profile' cannot be used with package options~%")))
> -----------
> 
> After commenting the form above, the compilation works flawless.

The guile2.2-bytestructures dependency of guile2.2-guix is broken currently
(see https://issues.guix.gnu.org/46844), which makes my proposal somewhat annoying
to test ...

Perhaps replace (when COND STUFF) with (define _ (when COND STUFF))? That should
be ok for both guile2.2 and guile3.0.  It's not very aesthetical, but if the
alternative is putting everything below (when COND STUFF) in a let form
(leading to more indentation), perhaps that's ok.

cage, could you verify whether this patch works for you?

Greetings,
Maxime.
-- 
Maxime Devos <maximedevos@telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos

[-- Attachment #1.2: 0001-scripts-environment-Replace-expression-with-definiti.patch --]
[-- Type: text/x-patch, Size: 1629 bytes --]

From 659e191c1e9d64a9cf7734db6e9bb99e47877344 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 1 Mar 2021 10:57:17 +0100
Subject: [PATCH] scripts: environment: Replace expression with definition.

This fixes the following build error when building guix with
GNU Guile 2.2.7 on Debian (bullseye) (reindented):

guix/scripts/environment.scm:752:12: error:
(define manifest (if profile (profile-manifest profile) manifest-from-opts)):
definition in expression context, where definitions are not allowed,

Fixes: <https://issues.guix.gnu.org/46826>.

* guix/scripts/environment.scm (guix-environment): Fix a syntax error
  on Guile 2.2.7.
---
 guix/scripts/environment.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index a39347743e..a28018e627 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -745,9 +745,10 @@ message if any test fails."
           (with-status-verbosity (assoc-ref opts 'verbosity)
             (define manifest-from-opts
               (options/resolve-packages store opts))
-            (when (and profile
-                       (> (length (manifest-entries manifest-from-opts)) 0))
-              (leave (G_ "'--profile' cannot be used with package options~%")))
+            (define _
+              (when (and profile
+                         (> (length (manifest-entries manifest-from-opts)) 0))
+                (leave (G_ "'--profile' cannot be used with package options~%"))))
 
             (define manifest
               (if profile
-- 
2.30.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  parent reply	other threads:[~2021-03-01 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28  8:03 bug#46826: [debian] compilation from git fails cage
2021-02-28  9:04 ` cage
2021-03-01 11:42 ` Maxime Devos [this message]
2021-03-01 13:12   ` cage
2021-03-01 20:40     ` Ludovic Courtès
2021-03-02 19:39       ` cage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35e9878676026fc49a7216083acebfae50f8bc23.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=46826@debbugs.gnu.org \
    --cc=cage-dev@twistfold.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).