emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42735: closed ([PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH)


From: GNU bug Tracking System
Subject: bug#42735: closed ([PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH)
Date: Fri, 14 Aug 2020 10:01:01 +0000

Your message dated Fri, 14 Aug 2020 13:00:16 +0300
with message-id <87lfihsg27.fsf@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@gnu.org.)


-- 
42735: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42735
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- 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@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@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




--- End Message ---
--- Begin Message --- Subject: Re: [bug#42735] [PATCH] pre-inst-env: don't use GUIX_PACKAGE_PATH Date: Fri, 14 Aug 2020 13:00:16 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Hi,

Denis 'GNUtoo' Carikli <GNUtoo@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@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@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@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.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]