GNU bug report logs -
#52347
Shell: error when -m manifest is removed
Previous Next
Reported by: cayetano.santos <at> inventati.org
Date: Tue, 7 Dec 2021 08:41:02 UTC
Severity: normal
Merged with 53892
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52347 in the body.
You can then email your comments to 52347 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 08:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
cayetano.santos <at> inventati.org
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Tue, 07 Dec 2021 08:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi guix,
Using latest guix, and considering a local manifest.scm file
with only
(specifications->manifest (list "python"))
Following command works
guix shell --container -m manifest.scm -- python3
But
guix shell --container -- python3
gives an error. However,
guix shell --container
followed by
python3
works.
So, by just removing the ’-m manifest.scm’ flag, I get an error.
Regards,
Cayetano Santos
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 09:27:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, 7 Dec 2021 at 09:41, Cayetano Santos via Bug reports for GNU
Guix <bug-guix <at> gnu.org> wrote:
> guix shell --container
>
> followed by
>
> python3
>
> works.
It works correctly for me. With Guix f43a783:
--8<---------------cut here---------------start------------->8---
$ guix shell -C -m manifest.scm -- python3 -c 'import this'
$ guix shell -C -m manifest.scm
[env]$ python3 -c 'import this'
$ guix shell -C
guix shell: warning: no packages specified; creating an empty environment
guix shell: warning: no packages specified; creating an empty environment
[env]$ python3
sh: python3: command not found
[env]$ $GUIX_ENVIRONMENT/bin/python3
sh: /gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile/bin/python3:
No such file or directory
[env]$ $GUIX_ENVIRONMENT/bin
sh: /gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile/bin: No such
file or directory
$ tree /gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile
/gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile
├── etc
│ └── profile
└── manifest
1 directory, 2 files
--8<---------------cut here---------------end--------------->8---
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 10:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Problem is
guix shell -C -- python3
Tried after ’guix pull’ and problem remains.
C.
>mar. 07 déc. 2021 at 10:26, zimoun <zimon.toutoune <at> gmail.com> ...
> Hi,
>
> On Tue, 7 Dec 2021 at 09:41, Cayetano Santos via Bug reports for
> GNU
> Guix <bug-guix <at> gnu.org> wrote:
>
>> guix shell --container
>>
>> followed by
>>
>> python3
>>
>> works.
>
> It works correctly for me. With Guix f43a783:
>
> --8<---------------cut
> here---------------start------------->8---
> $ guix shell -C -m manifest.scm -- python3 -c 'import this'
> $ guix shell -C -m manifest.scm
> [env]$ python3 -c 'import this'
>
> $ guix shell -C
> guix shell: warning: no packages specified; creating an empty
> environment
> guix shell: warning: no packages specified; creating an empty
> environment
> [env]$ python3
> sh: python3: command not found
> [env]$ $GUIX_ENVIRONMENT/bin/python3
> sh:
> /gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile/bin/python3:
> No such file or directory
> [env]$ $GUIX_ENVIRONMENT/bin
> sh: /gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile/bin: No
> such
> file or directory
>
> $ tree /gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile
> /gnu/store/h3al0y1pbr64gcjhmn4wn3v863vhc72a-profile
> ├── etc
> │ └── profile
> └── manifest
>
> 1 directory, 2 files
> --8<---------------cut
> here---------------end--------------->8---
>
>
> Cheers,
> simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 10:19:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, 7 Dec 2021 at 11:10, Cayetano Santos
<cayetano.santos <at> inventati.org> wrote:
>
>
> Problem is
>
> guix shell -C -- python3
>
> Tried after ’guix pull’ and problem remains.
Which revision do you use? Because using f43a783, it fails as expected. :-)
Are you running Guix on foreign distro or Guix System?
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 10:26:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 52347 <at> debbugs.gnu.org (full text, mbox):
>mar. 07 déc. 2021 at 11:18, zimoun <zimon.toutoune <at> gmail.com> ...
> Hi,
>
> On Tue, 7 Dec 2021 at 11:10, Cayetano Santos
> <cayetano.santos <at> inventati.org> wrote:
>>
>> Problem is
>>
>> guix shell -C -- python3
>>
>> Tried after ’guix pull’ and problem remains.
>
> Which revision do you use? Because using f43a783, it fails as
> expected. :-)
I’m using guix 05deb26.
Is it expected to fail when I remove the ’-m manifest’ flag and I
just run ’guix shell -C -- python3’ ?
> Are you running Guix on foreign distro or Guix System?
Foreign, on top of ArchLinux.
C.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 10:36:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, 7 Dec 2021 at 11:25, Cayetano Santos
<cayetano.santos <at> inventati.org> wrote:
> Is it expected to fail when I remove the ’-m manifest’ flag and I
> just run ’guix shell -C -- python3’ ?
The command "guix shell -C -- python3" fails. It cannot work, because
the environment (new shell) is empty. You need to provide what this
shell has to contain, via command line package list or via manifest.
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 10:45:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 52347 <at> debbugs.gnu.org (full text, mbox):
>mar. 07 déc. 2021 at 11:35, zimoun <zimon.toutoune <at> gmail.com> ...
> Hi,
>
> On Tue, 7 Dec 2021 at 11:25, Cayetano Santos
> <cayetano.santos <at> inventati.org> wrote:
>
>> Is it expected to fail when I remove the ’-m manifest’ flag and
>> I
>> just run ’guix shell -C -- python3’ ?
>
> The command "guix shell -C -- python3" fails. It cannot work,
> because
> the environment (new shell) is empty. You need to provide what
> this
> shell has to contain, via command line package list or via
> manifest.
To my understanding, in this blog entry
https://guix.gnu.org/en/blog/2021/from-guix-environment-to-guix-shell/
they claim that "guix shell automatically loads guix.scm or
manifest.scm, from the current directory"
No need to "-m manifest.scm", then.
C.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 12:03:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Cayetano Santos via Bug reports for GNU Guix schreef op di 07-12-2021
om 09:33 [+0100]:
>
> Hi guix,
>
> Using latest guix, and considering a local manifest.scm file
> with only
>
> (specifications->manifest (list "python"))
>
> Following command works
>
> guix shell --container -m manifest.scm -- python3
>
> But
>
> guix shell --container -- python3
>
> gives an error. However,
What's the error message?
Greetings,
Maxime
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 13:13:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, 7 Dec 2021 at 11:44, Cayetano Santos
<cayetano.santos <at> inventati.org> wrote:
> they claim that "guix shell automatically loads guix.scm or
> manifest.scm, from the current directory"
>
> No need to "-m manifest.scm", then.
Ah yes, sorry. Since I personally find implicit a bad thing, I have
forgotten about it. :-)
Anyway!
Indeed, there is a bug. It comes from 'stat:uid' vs 'getuid' in
'find-file-in-parent-directories'. On my machine, this
(= (stat:uid stat) (getuid))
compares 0 against 1001.
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 13:34:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
I am experiencing a similar situation without the container. At work,
I need some special Emacs packages, that I don't need/want in my normal
setup, so I do `guix shell -m manifest.scm -- emacs'. Even with the
directory added to the good noodles list, `guix shell -- emacs' fails,
probably because Guix assumes it has arguments when those really are
just the command to run. IOW the check for "when is implicit okay"
might be too narrow for this use case.
Cheers
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 13:42:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 52347 <at> debbugs.gnu.org (full text, mbox):
On Tue, 7 Dec 2021 at 14:33, Liliana Marie Prikler
<liliana.prikler <at> ist.tugraz.at> wrote:
> I am experiencing a similar situation without the container. At work,
> I need some special Emacs packages, that I don't need/want in my normal
> setup, so I do `guix shell -m manifest.scm -- emacs'. Even with the
> directory added to the good noodles list, `guix shell -- emacs' fails,
> probably because Guix assumes it has arguments when those really are
> just the command to run. IOW the check for "when is implicit okay"
> might be too narrow for this use case.
Similar root, I guess, described by https://issues.guix.gnu.org/52347#8 :-)
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 13:50:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Am Dienstag, den 07.12.2021, 14:41 +0100 schrieb zimoun:
> On Tue, 7 Dec 2021 at 14:33, Liliana Marie Prikler
> <liliana.prikler <at> ist.tugraz.at> wrote:
>
> > I am experiencing a similar situation without the container. At
> > work,
> > I need some special Emacs packages, that I don't need/want in my
> > normal
> > setup, so I do `guix shell -m manifest.scm -- emacs'. Even with
> > the
> > directory added to the good noodles list, `guix shell -- emacs'
> > fails,
> > probably because Guix assumes it has arguments when those really
> > are
> > just the command to run. IOW the check for "when is implicit okay"
> > might be too narrow for this use case.
>
> Similar root, I guess, described by
> https://issues.guix.gnu.org/52347#8 :-)
I am pretty sure all files are owned by the same user in my case. Can
stat:uid really return 0 then?
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 14:28:03 GMT)
Full text and
rfc822 format available.
Message #41 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, 7 Dec 2021 at 14:48, Liliana Marie Prikler
<liliana.prikler <at> ist.tugraz.at> wrote:
> I am pretty sure all files are owned by the same user in my case. Can
> stat:uid really return 0 then?
Maybe I am doing wrong but I just 'pk' in find-file-in-parent-directories. :-)
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 16:24:01 GMT)
Full text and
rfc822 format available.
Message #44 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Am Dienstag, den 07.12.2021, 15:27 +0100 schrieb zimoun:
> Hi,
>
> On Tue, 7 Dec 2021 at 14:48, Liliana Marie Prikler
> <liliana.prikler <at> ist.tugraz.at> wrote:
>
> > I am pretty sure all files are owned by the same user in my
> > case. Can
> > stat:uid really return 0 then?
>
> Maybe I am doing wrong but I just 'pk' in find-file-in-parent-
> directories. :-)
You are doing wrong:
(if (or (not interactive?) ; true if giving -- COMMAND
disallow-implicit-load?
(options-contain-payload? opts))
So the pk in find-file-in-parent-directories should not even fire. I'm
pretty sure the interactive constraint has a reasoning that was
explained back then, so we should investigate carefully whether we want
to overthrow that. Warning, that noninteractive use of `guix shell'
requires an explicit manifest is also an option imo.
By the way, if we do search for a file, but find none, the warning
(warning (G_ "no packages specified; creating an empty environment~%"))
is displayed twice; once by auto-detect-manifest and once by guix-
environment*. We should probably change that string to something that
indicates that we've attempted to auto-load a manifest.
Cheers
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 17:13:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Tue, 7 Dec 2021 at 17:23, Liliana Marie Prikler
<liliana.prikler <at> gmail.com> wrote:
> > Maybe I am doing wrong but I just 'pk' in find-file-in-parent-
> > directories. :-)
> You are doing wrong:
>
> (if (or (not interactive?) ; true if giving -- COMMAND
Yes, indeed. I simply grepped "manifest" and looked at
'find-file-in-parent-directories', because if it is not called, the
"manifest" file cannot be loaded. :-) Then I incorrectly used the
wrong command line invokation. Bad day with a lot of inattentive
today. :-/
> So the pk in find-file-in-parent-directories should not even fire. I'm
> pretty sure the interactive constraint has a reasoning that was
> explained back then, so we should investigate carefully whether we want
> to overthrow that. Warning, that noninteractive use of `guix shell'
> requires an explicit manifest is also an option imo.
I am in favour to keep it explicit. (Personally, I already find that
"guix shell" is wrong ;-))
> By the way, if we do search for a file, but find none, the warning
> (warning (G_ "no packages specified; creating an empty environment~%"))
> is displayed twice; once by auto-detect-manifest and once by guix-
> environment*. We should probably change that string to something that
> indicates that we've attempted to auto-load a manifest.
I agree.
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 18:13:01 GMT)
Full text and
rfc822 format available.
Message #50 received at 52347 <at> debbugs.gnu.org (full text, mbox):
>mar. 07 déc. 2021 at 12:02, Maxime Devos <maximedevos <at> telenet.be>
>...
> What's the error message?
Output to ’guix shell --container -- python3’ gives
guix shell: avertissement : aucun paquet spécifié ; création d'un
environnement vide
guix shell: erreur : python3: command not found
Backtrace:
16 (primitive-load "/usr/local/bin/guix")
In guix/ui.scm:
2206:7 15 (run-guix . _)
2169:10 14 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 13 (with-exception-handler _ _ #:unwind? _ # _)
1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
658:37 11 (thunk)
1320:8 10 (call-with-build-handler _ _)
1320:8 9 (call-with-build-handler #<procedure 7fbb1d6516f0 at
g…> …)
In guix/status.scm:
800:4 8 (call-with-status-report _ _)
In guix/scripts/environment.scm:
951:12 7 (_)
In guix/store.scm:
2119:24 6 (run-with-store #<store-connection 256.99
7fbb2132ccd0> …)
In guix/scripts/environment.scm:
627:17 5 (_ _)
576:23 4 (validate-exit-status _ _ 32512)
In guix/utils.scm:
954:4 3 (string-closest _ _ #:threshold _)
In guix/combinators.scm:
46:32 2 (fold2 #<procedure 7fbb10e14380 at
guix/utils.scm:954:…> …)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure car: Wrong type argument in position 1 (expecting
pair): #f
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Tue, 07 Dec 2021 19:07:02 GMT)
Full text and
rfc822 format available.
Message #53 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Cayetano Santos schreef op di 07-12-2021 om 19:11 [+0100]:
> In guix/scripts/environment.scm:
> 627:17 5 (_ _)
> 576:23 4 (validate-exit-status _ _ 32512)
> In guix/utils.scm:
> 954:4 3 (string-closest _ _ #:threshold _)
> In guix/combinators.scm:
> 46:32 2 (fold2 #<procedure 7fbb10e14380 at
> guix/utils.scm:954:…> …)
> In ice-9/boot-9.scm:
> 1685:16 1 (raise-exception _ #:continuable? _)
> 1685:16 0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure car: Wrong type argument in position 1 (expecting
> pair): #f
Seems like suggest-command-name is passing #f to string-closest instead
of a list (a bug!).
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Wed, 22 Dec 2021 22:43:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi,
Cayetano Santos <cayetano.santos <at> inventati.org> skribis:
> In guix/scripts/environment.scm:
> 627:17 5 (_ _)
> 576:23 4 (validate-exit-status _ _ 32512)
> In guix/utils.scm:
> 954:4 3 (string-closest _ _ #:threshold _)
> In guix/combinators.scm:
> 46:32 2 (fold2 #<procedure 7fbb10e14380 at
> guix/utils.scm:954:…> …)
> In ice-9/boot-9.scm:
> 1685:16 1 (raise-exception _ #:continuable? _)
> 1685:16 0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure car: Wrong type argument in position 1 (expecting pair):
> #f
This particular issue was fixed in
16e9e538386bf30da690502c65b8053ff266e8cb.
Thanks,
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52347
; Package
guix
.
(Wed, 22 Dec 2021 22:50:01 GMT)
Full text and
rfc822 format available.
Message #59 received at 52347 <at> debbugs.gnu.org (full text, mbox):
Hi Cayetano,
Cayetano Santos <cayetano.santos <at> inventati.org> skribis:
> Following command works
>
> guix shell --container -m manifest.scm -- python3
>
> But
>
> guix shell --container -- python3
>
> gives an error. However,
>
> guix shell --container
>
> followed by
>
> python3
>
> works.
>
> So, by just removing the ’-m manifest.scm’ flag, I get an error.
As Liliana noted, this is the intended behavior: auto-loading of
‘manifest.scm’ happens only for interactive use. This is to keep
non-interactive use context-independent and thereby avoid bad surprises.
Note that when ‘manifest.scm’ is auto-loaded, a message is printed; when
it’s not considered, no message is printed. Likewise, when creating an
empty environment, a warning is printed (twice even :-)).
Any suggestions on things we might improve to avoid confusion?
Thanks,
Ludo’.
Merged 52347 53892.
Request was from
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 09 Feb 2022 15:41:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 31 Mar 2022 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.