unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Sergio Pastor Pérez" <sergio.pastorperez@outlook.es>
To: 66419@debbugs.gnu.org
Subject: bug#66419: Incorrect handling of -L flag on guix system commands
Date: Mon, 09 Oct 2023 12:16:50 +0200	[thread overview]
Message-ID: <DU2P193MB2132FC35A4F3B48A2C83AFE2F3CEA@DU2P193MB2132.EURP193.PROD.OUTLOOK.COM> (raw)

Good morning.

I've noticed that in system configurations split into different modules,
when using the -L flag, the `guix system build` command incorrectly
issues some errors. The error is ignored and the system is built
successfully.

For example, given a base system and 2 systems that inherit from it, the
error appears when building any of them:
--8<---------------cut here---------------start------------->8---
λ ls
base-system.scm  bordercollie.scm  sheepbook.scm
--8<---------------cut here---------------end--------------->8---

base-system.scm:
--8<---------------cut here---------------start------------->8---
(define-module (base-system)
  #:use-module (gnu))
...
(define-public %base-system
  (operating-system
   ...))
--8<---------------cut here---------------end--------------->8---

bordercollie.scm:
--8<---------------cut here---------------start------------->8---
(define-module (bordercollie)
  #:use-module (base-system)
  ...)
(operating-system
  (inherit %base-system)
  ...)
--8<---------------cut here---------------end--------------->8---

sheepbook.scm:
--8<---------------cut here---------------start------------->8---
(define-module (sheepbook)
  #:use-module (base-system)
  ...)
(operating-system
  (inherit %base-system)
  ...)
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
λ guix system build -L . bordercollie.scm 
error: %useful-gnome-extensions: unbound variable
hint: Did you forget `(use-modules (base-system))'?

/gnu/store/gf21yc9ii1cfd3ki9hnn8ac5d65923ir-system
--8<---------------cut here---------------end--------------->8---

As you can see this command has built successfully. Note that in this
particular case the error says that the unbound variable is
`%useful-gnome-extensions'. It will complain always about the first
think it encounters.

On the other hand relying on the `GUILE_LOAD_PATH', instead of using the
'-L' flag, removes the error:
--8<---------------cut here---------------start------------->8---
λ GUILE_LOAD_PATH=$(pwd):$GUILE_LOAD_PATH guix system build bordercollie.scm
/gnu/store/gf21yc9ii1cfd3ki9hnn8ac5d65923ir-system
--8<---------------cut here---------------end--------------->8---

I've noticed that for the error to appear, there has to be 2 systems
inheriting from the `base-system` module. If I remove `bordercollie.scm`
or `sheepbook.scm`, the other will build without issuing the error.

Regards,
Sergio.




             reply	other threads:[~2023-10-09 10:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 10:16 Sergio Pastor Pérez [this message]
2023-10-12 14:28 ` bug#66419: Incorrect handling of -L flag on guix system commands Ludovic Courtès

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=DU2P193MB2132FC35A4F3B48A2C83AFE2F3CEA@DU2P193MB2132.EURP193.PROD.OUTLOOK.COM \
    --to=sergio.pastorperez@outlook.es \
    --cc=66419@debbugs.gnu.org \
    /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).