GNU bug report logs - #53355
guix shell --check: confusing error message

Previous Next

Package: guix;

Reported by: Chris Marusich <cmmarusich <at> gmail.com>

Date: Wed, 19 Jan 2022 03:30:02 UTC

Severity: normal

Tags: moreinfo

Merged with 51466

Full log


View this message in rfc822 format

From: bokr <at> bokr.com
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 53355 <at> debbugs.gnu.org, Chris Marusich <cmmarusich <at> gmail.com>, 51466 <at> debbugs.gnu.org
Subject: bug#53355: bug#51466: bug#53355: guix shell --check: confusing error message
Date: Mon, 27 Jun 2022 13:23:15 +0200
On +2022-06-27 12:17:08 +0200, Ludovic Courtès wrote:
> Hi Chris,
> 
> Chris Marusich <cmmarusich <at> gmail.com> skribis:
> 
> > It turns out that it is probably not OK to rely on shell redirection in
> > this case, after all.  For example, "dash does not support multi-digit
> > file descriptors":
> >
> > https://bugs.launchpad.net/ubuntu/+source/dash/+bug/249620
> 
> Bah.  :-/
> 
> [...]
> 
> > To resolve this, I changed the code so that it just writes to a
> > temporary file.  This is simple and more robust.  With the attached
> > patch, I was able to use a command like the one above to verify that
> > "guix environment --check" works correctly for Guix-built bash, dash,
> > ksh, fish, zsh, and ash.  I also verified that it works for Fedora's
> > /bin/sh and /bin/bash.
> >
> > What do you think of this file-based approach?  Supporting many
> > different shells is pretty tricky, but I think this patch does a good
> > enough job.
> 
> Like Maxime, I’d rather not create a temporary file.
> 
> I agree that Dash should be fixed, but in the meantime, we still want
> our stuff to work with the broken Dash (it’s the default on
> Debian/Ubuntu, isn’t it?).
> 
> I don’t have a better idea to offer though…
> 
> Ludo’.
> 
> 
>
If this is all about capturing an environment as text,
how about

--8<---------------cut here---------------start------------->8---
xargs -0 < /proc/$$/environ
--8<---------------cut here---------------end--------------->8---

(not limited to $$ I would think)
--
Regards,
Bengt Richter




This bug report was last modified 2 years and 346 days ago.

Previous Next


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