Subject: Re: bug#66419: Incorrect handling of -L flag on guix system commands

From: Ludovic Courtès <[email-masked]>
Date: Thu, 12 Oct 2023 16:28:51 +0200

Hi,

Sergio Pastor Pérez <[email-masked]> skribis:

> λ guix system build -L . bordercollie.scm 
> error: %useful-gnome-extensions: unbound variable
> hint: Did you forget `(use-modules (base-system))'?
>
> /gnu/store/gf21yc9ii1cfd3ki9hnn8ac5d65923ir-system

‘-L’ does more than setting ‘GUILE_LOAD_PATH’; it’s equivalent to ‘-L’
in other ‘guix’ commands, meaning that it changes ‘%package-search-path’
(like the ‘GUIX_PACKAGE_PATH’ environment variable).

In doing so, it causes package lookup by name to traverse all the .scm
files in $PWD in this case.  In other words, ‘guix system -L.’ ends up
loading ./*.scm.  This is probably the source of confusion.

HTH,
Ludo’.