GNU bug report logs - #57801
'inferior-with-channels' is eager, making it hard to use in channels

Previous Next

Package: guix;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Wed, 14 Sep 2022 12:29:02 UTC

Severity: normal

To reply to this bug, email your comments to 57801 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#57801; Package guix. (Wed, 14 Sep 2022 12:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxime Devos <maximedevos <at> telenet.be>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 14 Sep 2022 12:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guix <bug-guix <at> gnu.org>
Subject: 'inferior-with-channels' is eager, making it hard to use in channels
Date: Wed, 14 Sep 2022 14:28:20 +0200
[Message part 1 (text/plain, inline)]
As experienced by Luks6655, you can't do

(define inferior (inferior-with-channels CHANNELS))

on the top-level of a channel module.  I think the issue is that 
inferior-with-channels is eager (not lazy), so it cannot be used in a 
channel on the top-level, as builds (including channel builds) are 
isolated from the network and have limited access to the file system.

If it would be made lazy, then

(define inferior (inferior-with-channels CHANNELS))
(define-public p
  (package
    [...]
    (inputs (list (lookup-inferior-package inferior "hello")))))

should, in theory, work (unverified).

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#57801; Package guix. (Wed, 14 Sep 2022 17:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 57801 <at> debbugs.gnu.org (full text, mbox):

From: Lukasz Olszewski <dev <at> lukaszolszewski.info>
To: 57801 <at> debbugs.gnu.org
Subject: Re: 'inferior-with-channels' is eager,
 making it hard to use in channels
Date: Wed, 14 Sep 2022 19:18:03 +0200
Additionally this fails even when used like this:

(define inferior
  (mlambda ()
    (inferior-for-channels channels)))

(lookup-inferior-packages (inferior) "somepackage")




Information forwarded to bug-guix <at> gnu.org:
bug#57801; Package guix. (Thu, 15 Sep 2022 15:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 57801 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Lukasz Olszewski <dev <at> lukaszolszewski.info>, 57801 <at> debbugs.gnu.org
Subject: Re: bug#57801: 'inferior-with-channels' is eager, making it hard to
 use in channels
Date: Thu, 15 Sep 2022 17:46:15 +0200
[Message part 1 (text/plain, inline)]

On 14-09-2022 19:18, Lukasz Olszewski wrote:
> Additionally this fails even when used like this:
> 
> (define inferior
>    (mlambda ()
>      (inferior-for-channels channels)))

This makes it lazy (not eager).

> (lookup-inferior-packages (inferior) "somepackage")

You are running (inferior) directly after defining the lazy thing, 
making it effectively _eager_ (not lazy) again.

Instead of doing this on the top-level, move the 
lookup-inferior-packages to inside the 'inputs' or 'native-inputs', to 
_keep_ it lazy.

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#57801; Package guix. (Fri, 13 Sep 2024 11:15:02 GMT) Full text and rfc822 format available.

Message #14 received at 57801 <at> debbugs.gnu.org (full text, mbox):

From: Moisés Simón Vázquez
 <moises.simon <at> universaldx.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: "57801 <at> debbugs.gnu.org" <57801 <at> debbugs.gnu.org>
Subject: Re: bug#57801: 'inferior-with-channels' is eager, making it hard to
 use in channels
Date: Fri, 13 Sep 2024 08:36:21 +0000
Sorry for the empty reply...

How can we define an inferior package?

some commit broke ceph and we need it.  Doing this:

in top of our channels break pulling with:


,----
| (define inferior-for-ceph
|   (inferior-for-channels (list (channel
|                                 (name 'guix)
|                                 (url "https://git.savannah.gnu.org/git/guix.git")
|                                 (commit "53396a22afc04536ddf75d8f82ad2eafa5082725")))))
| 
| (define ceph
|   (first (lookup-inferior-packages inferior-for-ceph "ceph")))
`----


,----
| (repl-version 0 1 1)
| (exception %exception (non-self-quoting 140736906039808 "#<&store-connection-error file: \"/var/guix/daemon-socket/socket\" errno: 2>"))
`----

Do you know what would be the workaround?




This bug report was last modified 77 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.