From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePnPT-0003tB-Ku for guix-patches@gnu.org; Fri, 15 Dec 2017 05:40:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePnPO-0001b4-LK for guix-patches@gnu.org; Fri, 15 Dec 2017 05:40:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePnPO-0001as-Ha for guix-patches@gnu.org; Fri, 15 Dec 2017 05:40:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePnPO-0004hD-AE for guix-patches@gnu.org; Fri, 15 Dec 2017 05:40:02 -0500 Subject: [bug#29409] [PATCH v2 3/4] scripts: system: Add --expression option. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <1513162937-13145-1-git-send-email-m.othacehe@gmail.com> <1513162937-13145-3-git-send-email-m.othacehe@gmail.com> Date: Fri, 15 Dec 2017 11:39:34 +0100 In-Reply-To: <1513162937-13145-3-git-send-email-m.othacehe@gmail.com> (m. othacehe's message of "Wed, 13 Dec 2017 12:02:16 +0100") Message-ID: <87vah8jmvt.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: m.othacehe@gmail.com Cc: 29409@debbugs.gnu.org m.othacehe@gmail.com skribis: > From: Mathieu Othacehe > > * guix/scripts/system.scm (show-help): Add expression option. > (%options): Ditto. > (process-action): Read operating-system from expression or file. > * Makefile.am (release): Use expression instead of file to produce > disk-images. > * doc/guix.texi (Building the Installation Image): Adapt disk-image comma= nd to > use an expression. > (Invoking guix system): Introduce the expression option. > --- > Makefile.am | 2 +- > doc/guix.texi | 10 +++++++++- > guix/scripts/system.scm | 24 +++++++++++++++++++----- > 3 files changed, 29 insertions(+), 7 deletions(-) > > diff --git a/Makefile.am b/Makefile.am > index 85b9ab3..dff1e5e 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -648,7 +648,7 @@ release: dist > guix system disk-image \ > --file-system-type=3Diso9660 \ > --system=3D$$system \ > - gnu/system/install.scm` ; \ > + -e "(@ (gnu system install) installation-os)"` ; \ [...] > @example > -guix system disk-image gnu/system/install.scm > +guix system disk-image -e "(@@ (gnu system install) installation-os)" > @end example I=E2=80=99d suggest leaving these two things unchanged because it=E2=80=99s= still more convenient to type the file name. > (display (G_ " > + -e, --expression=3DEXPR consider the operating-system EXPR evaluates = to ^ No hyphen. [...] > (case action > ((build container vm vm-image disk-image reconfigure) > - (unless (=3D count 1) > + (unless (or (=3D count 1) (=3D count 0)) > (fail))) What happens if we run =E2=80=9Cguix system vm=E2=80=9D? Do we still get a= proper error? The rest LGTM. Thanks, Ludo=E2=80=99.