bug-guix
[Top][All Lists]
Advanced

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

Re: guix-package --roll-back


From: Nikita Karetnikov
Subject: Re: guix-package --roll-back
Date: Fri, 11 Jan 2013 00:48:22 -0500

> See SRFI-37 in Guile’s manual.

Yeah, I've already checked it, but it's very brief.

I created a simple function to test command-line options, but I'm having
the same problems.  Here is the function:

(define* (foo #:optional arg)
  (if arg
      (simple-format #t "Just ~a~%" arg)
      (simple-format #t "Nothing~%")))

The following version works:

(option '("foo") #f #t
        (lambda (opt name arg result)
          (foo arg)
          (exit 0)))

# ./pre-inst-env guix-package --foo=42
Just 42

# ./pre-inst-env guix-package --foo
Nothing

This one doesn't work at all:

(option '("foo") #f #t
        (lambda (opt name arg result)
          (alist-cons 'foo arg result)))

Actually, the above helped me to understand that we want '--roll-back'
to behave differently than '--foo'.  '--roll-back' shouldn't accept any
options at all, but it should somehow get the argument of '--profile'.
How can I do it?

Nikita

Attachment: pgplq4xrCcOdZ.pgp
Description: PGP signature


reply via email to

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