all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using 'system*' instead of 'system' in 'guix environment'
@ 2015-10-08  1:28 David Thompson
  2015-10-08  7:53 ` Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: David Thompson @ 2015-10-08  1:28 UTC (permalink / raw)
  To: guix-devel

Hello Guix hackers,

In an effort to finish up a patch to add a --container flag to 'guix
environment', I've encountered a serious problem.  The --exec flag
allows the user to pass an arbitrary command to be run using 'system'.
Unlike 'system*', 'system' spawns a command interpreter first and passes
the command string in.  This is very problematic when using a container,
because there's a very good chance that the command interpreter of the
running Guile process is not mounted inside the container.

So, I think we should switch to using 'system*' instead which will avoid
this hairy issue.  However, it's unclear to me how to make this happen.
I wanted to use 'system*' since I first wrote 'guix environment', but I
couldn't figure out how to make the command line syntax work since each
argument needs to be processed separately instead of being bunched up
into a string.

If the above explanation is confusing, the 'sudo' program provides a
good example of the UI I'm after:

    sudo guile -c '(do-root-things)'

But for now we're stuck with this:

    guix environment --ad-hoc guile -E "guile -c '(do-root-things)'"

Now, we can't actually do exactly what 'sudo' does because 'guix
environment' already recognizes operands as package names, not program
arguments.  Perhaps we can use '--' to separate the package list from
the command to run:

    guix environment --ad-hoc guile -- guile -c '(do-root-things)'

Does that look okay?  Any other ideas?

Thanks,

- Dave

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-10-09 22:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08  1:28 Using 'system*' instead of 'system' in 'guix environment' David Thompson
2015-10-08  7:53 ` Ludovic Courtès
2015-10-08 12:41   ` Thompson, David
2015-10-08 14:59     ` Ludovic Courtès
2015-10-08 15:42       ` Thompson, David
2015-10-08 16:05         ` Taylan Ulrich Bayırlı/Kammer
2015-10-08 16:32           ` Thompson, David
2015-10-08 17:10             ` Taylan Ulrich Bayırlı/Kammer
2015-10-08 16:53         ` Ludovic Courtès
2015-10-08 17:12           ` Thompson, David
2015-10-09  1:29           ` Thompson, David
2015-10-09 12:23             ` Ludovic Courtès
2015-10-09 16:21               ` Thompson, David
2015-10-08 15:09     ` Taylan Ulrich Bayırlı/Kammer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.