~ruther/guix-local

db3f2b61adfe56d69029ec5f6d962462a50a1f33 — Ludovic Courtès 9 years ago 9e84ea3
pack: Allow for "-S /opt/foo=".

Reported by Andy Wingo.

* guix/scripts/pack.scm (%options): Use 'string-split' instead of
'string-tokenize'.
1 files changed, 4 insertions(+), 3 deletions(-)

M guix/scripts/pack.scm
M guix/scripts/pack.scm => guix/scripts/pack.scm +4 -3
@@ 283,9 283,10 @@ with COMPRESSOR.  It can be passed to 'docker load'."
                               result)))
         (option '(#\S "symlink") #t #f
                 (lambda (opt name arg result)
                   (match (string-tokenize arg
                                           (char-set-complement
                                            (char-set #\=)))
                   ;; Note: Using 'string-split' allows us to handle empty
                   ;; TARGET (as in "/opt/guile=", meaning that /opt/guile is
                   ;; a symlink to the profile) correctly.
                   (match (string-split arg (char-set #\=))
                     ((source target)
                      (let ((symlinks (assoc-ref result 'symlinks)))
                        (alist-cons 'symlinks