GNU bug report logs - #42735
[PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Fri, 7 Aug 2020 02:28:02 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#42735: closed ([PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH)
Date: Fri, 14 Aug 2020 10:01:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 14 Aug 2020 13:00:16 +0300
with message-id <87lfihsg27.fsf <at> gmail.com>
and subject line Re: [bug#42735] [PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH
has caused the debbugs.gnu.org bug report #42735,
regarding [PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
42735: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42735
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: guix-patches <at> gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH
Date: Fri,  7 Aug 2020 04:21:42 +0200
./pre-inst-env is supposed to use only the packages definitions that are in
the guix source tree and not the host packages.

However if GUIX_PACKAGE_PATH is set, it will use host packages as well.

In addition, when packages are defined in both the guix source tree and in
GUIX_PACKAGE_PATH, GUIX_PACKAGE_PATH will take the precedence and guix
will print warnings like that:
    guix build: warning: ambiguous package specification `libsamsung-ipc'
    guix build: warning: choosing libsamsung-ipc <at> 0.1 from
                         /home/[...]/.config/guix/local/replicant.scm:31:2

That situation can happen when working in a new package in
GUIX_PACKAGE_PATH and then importing the package in the guix source tree to
add it upstream.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 build-aux/pre-inst-env.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/build-aux/pre-inst-env.in b/build-aux/pre-inst-env.in
index e0aa7fe868..698a7994fb 100644
--- a/build-aux/pre-inst-env.in
+++ b/build-aux/pre-inst-env.in
@@ -59,4 +59,8 @@ export NIX_HASH
 GUIX_UNINSTALLED=1
 export GUIX_UNINSTALLED
 
+# Make sure we don't use local package definitions
+GUIX_PACKAGE_PATH=""
+export GUIX_PACKAGE_PATH
+
 exec "$@"
-- 
2.28.0



[Message part 3 (message/rfc822, inline)]
From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Cc: 42735-done <at> debbugs.gnu.org
Subject: Re: [bug#42735] [PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH
Date: Fri, 14 Aug 2020 13:00:16 +0300
[Message part 4 (text/plain, inline)]
Hi,

Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org> writes:

[…]

> Should a warning be emitted when packages come from GUIX_PACKAGE_PATH
> with ./pre-inst-env ?

I don't think a user needs another warning for an environment variable
which he setted by himself.  Also, user could use ‘-L’ flag instead of
‘GUIX_PACKAGE_PATH’.


Currently,

with ‘hello’ package in GUIX_PACKAGE_PATH:
--8<---------------cut here---------------start------------->8---
oleg <at> guixsd ~/src/guix-master$ GUIX_PACKAGE_PATH=/home/oleg/src/guix-wigust/guix ./pre-inst-env guix build --no-grafts --no-offload hello
guix build: warning: ambiguous package specification `hello'
guix build: warning: choosing hello <at> 2.10 from /home/oleg/src/guix-wigust/guix/wigust/packages/games.scm:174:2
/gnu/store/a462kby1q51ndvxdv3b6p0rsixxrgx1h-hello-2.10
--8<---------------cut here---------------end--------------->8---

without ‘hello’ package in GUIX_PACKAGE_PATH:
--8<---------------cut here---------------start------------->8---
oleg <at> guixsd ~/src/guix-master$ GUIX_PACKAGE_PATH=/home/oleg/src/guix-wigust/guix ./pre-inst-env guix build --no-grafts --no-offload hello
/gnu/store/a462kby1q51ndvxdv3b6p0rsixxrgx1h-hello-2.10
--8<---------------cut here---------------end--------------->8---

> The issue is if it picks dependencies from GUIX_PACKAGE_PATH which are
> not in Guix source code yet. In that case it might be more complicated
> to make sure that people will see the warning as it might be hidden in
> the huge build log.
>
> Another option which can also be combined with the previous one would be
> to warn people in the manual.

It's already documented, isn't it?

https://www.gnu.org/software/guix/manual/html_node/Package-Modules.html
--8<---------------cut here---------------start------------->8---
 -- Environment Variable: GUIX_PACKAGE_PATH
     This is a colon-separated list of directories to search for
     additional package modules.  Directories listed in this variable
     take precedence over the own modules of the distribution.
--8<---------------cut here---------------end--------------->8---

I'll close the bug.  Feel free to reopen if I miss something.


Regards,
Oleg.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 284 days ago.

Previous Next


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