From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: 45933@debbugs.gnu.org
Subject: [bug#45933] system: Rename 'disk-image' command to 'image'.
Date: Tue, 19 Jan 2021 15:23:42 +0100 [thread overview]
Message-ID: <87k0s9huoh.fsf@gnu.org> (raw)
In-Reply-To: <87h7nfx2p8.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 17 Jan 2021 11:44:35 +0100")
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’.
next prev parent reply other threads:[~2021-01-19 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-17 10:44 [bug#45933] system: Rename 'disk-image' command to 'image' Mathieu Othacehe
2021-01-19 14:23 ` Ludovic Courtès [this message]
2021-01-19 16:19 ` bug#45933: " Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0s9huoh.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=45933@debbugs.gnu.org \
--cc=othacehe@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.