[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45933] system: Rename 'disk-image' command to 'image'.
From: |
Ludovic Courtès |
Subject: |
[bug#45933] system: Rename 'disk-image' command to 'image'. |
Date: |
Tue, 19 Jan 2021 15:23:42 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi!
Mathieu Othacehe <othacehe@gnu.org> skribis:
> With the new image API, the disk-image command is able to produce raw
> disk-images, ISO9660 images and maybe in the future docker images. Hence
> I feel that 'disk-image' in not the better command name anymore.
+1
> This patch renames the command name to 'image' and deprecates the old
> command. I think it would also be nice for this command to be able to
> process both <operating-system> files as well as <image> files, this
> way:
>
> gnu system image my-os.scm
> gnu system image my-image.scm
>
>
> When my-image.scm could be for instance:
>
[...]
> (image
> (inherit
> (os->image my-os #:type pinebook-pro-image-type))
> (name 'my-pinebook-pro-raw-image))
That makes sense to me. IIUC, the semantics could be:
1. If given an OS, wrap it in a “default” image.
2. Interpret command-line options like ‘--file-system-type’ as changes
to the <image>.
How does that sound?
>>From c58ced3271ef1a62642a3011f0a8020039a008bd Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <othacehe@gnu.org>
> Date: Sun, 17 Jan 2021 11:32:51 +0100
> Subject: [PATCH] system: Rename 'disk-image' command 'image'.
>
> * guix/scripts/system.scm (system-derivation-for-action): Rename 'disk-image'
> command 'image'. Warn when using the now deprecated 'disk-image' command.
> (show-help): Adapt accordingly.
> (guix-system): Ditto.
> * tests/guix-system.sh: Ditto.
> * gnu/system/examples/bare-hurd.tmpl: Ditto.
> * doc/guix.texi: Adapt documentation.
^
Nitpick: please specify the Texinfo node name(s) here.
> + ((image disk-image)
> (let* ((base-image (os->image os #:type image-type))
> (base-target (image-target base-image)))
> + (when (eq? action 'disk-image)
> + (warning (G_ "'disk-image' is deprecated, use 'image'
> instead~%")))
^
Rather semicolon (I think).
Otherwise LGTM, thanks!
Ludo’.