(address . bug-guix@gnu.org)
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:
Toggle snippet (4 lines)
λ ls
base-system.scm bordercollie.scm sheepbook.scm
base-system.scm:
Toggle snippet (8 lines)
(define-module (base-system)
#:use-module (gnu))
...
(define-public %base-system
(operating-system
...))
bordercollie.scm:
Toggle snippet (8 lines)
(define-module (bordercollie)
#:use-module (base-system)
...)
(operating-system
(inherit %base-system)
...)
sheepbook.scm:
Toggle snippet (8 lines)
(define-module (sheepbook)
#:use-module (base-system)
...)
(operating-system
(inherit %base-system)
...)
Toggle snippet (7 lines)
λ guix system build -L . bordercollie.scm
error: %useful-gnome-extensions: unbound variable
hint: Did you forget `(use-modules (base-system))'?
/gnu/store/gf21yc9ii1cfd3ki9hnn8ac5d65923ir-system
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:
Toggle snippet (4 lines)
λ GUILE_LOAD_PATH=$(pwd):$GUILE_LOAD_PATH guix system build bordercollie.scm
/gnu/store/gf21yc9ii1cfd3ki9hnn8ac5d65923ir-system
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.