Subject: [bug#27661] ISO-9660 image working and ready

From: Danny Milosavljevic <[email-masked]>
Date: Tue, 18 Jul 2017 16:30:56 +0200

Hi Ludo,

On Tue, 18 Jul 2017 15:08:49 +0200 [email-masked] (Ludovic Courtès) wrote:
>--- a/gnu/build/vm.scm
>+the result to OUTPUT.  Unless SINGLE-FILE-OUTPUT? is true, the result is
>+copied recursively to OUTPUT.

What happens when SINGLE-FILE-OUTPUT? is true? :)

I'd say something like,

If SINGLE-FILE-OUTPUT? is true, copy a single file from /xchg to OUTPUT.
Otherwise, copy the contents of /xchg to a new directory OUTPUT.

>+    (if single-file-output?
>+        (let ((graph? (lambda (name stat)
>+                        (member (basename name) references-graphs))))
>+          (copy-file (first (find-files "xchg" (negate graph?)))

Maybe raise error when there's more than one possibility?

>+derivation).  In the virtual machine, EXP has access to all its inputs from
>+the store; it should put its output files in the `/xchg' directory, which is
>+copied to the derivation's output when the VM terminates, recursively, unless
>+SINGLE-FILE-OUTPUT? is true. 

What if it's true?

>+++ b/guix/scripts/system.scm
[...]
>+     (system-disk-image os
>+                        #:name (match file-system-type
>+                                 ("iso9660" "image.iso")
>+                                 (_         "disk-image"))

If we called it "disk-image" in the iso9660 case as well we'd not have this special case.  Do we want to?

Overall LGTM!