From patchwork Tue Nov 6 09:53:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 126 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 29639167C2; Tue, 6 Nov 2018 10:00:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) by mira.cbaines.net (Postfix) with ESMTPS id 9F1551675C for ; Tue, 6 Nov 2018 10:00:13 +0000 (GMT) Received: from localhost ([::1]:39981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJy9c-00071m-TD for patchwork@mira.cbaines.net; Tue, 06 Nov 2018 05:00:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJy4j-0001DH-07 for guix-patches@gnu.org; Tue, 06 Nov 2018 04:55:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJy4c-0006ws-KX for guix-patches@gnu.org; Tue, 06 Nov 2018 04:55:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59978) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJy4c-0006w7-BO for guix-patches@gnu.org; Tue, 06 Nov 2018 04:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJy4c-0007C5-5W for guix-patches@gnu.org; Tue, 06 Nov 2018 04:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#33286] Add 'list-formats' to 'guix pack' Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Nov 2018 09:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33286 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 33286@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.154149809327634 (code B ref -1); Tue, 06 Nov 2018 09:55:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Nov 2018 09:54:53 +0000 Received: from localhost ([127.0.0.1]:36003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJy4S-0007Bd-OH for submit@debbugs.gnu.org; Tue, 06 Nov 2018 04:54:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJy4R-0007BR-N9 for submit@debbugs.gnu.org; Tue, 06 Nov 2018 04:54:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJy4G-0006Uf-Hv for submit@debbugs.gnu.org; Tue, 06 Nov 2018 04:54:44 -0500 Received: from lists.gnu.org ([2001:4830:134:3::11]:45018) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJy45-0006Ia-8G for submit@debbugs.gnu.org; Tue, 06 Nov 2018 04:54:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJy42-0000ox-0q for guix-patches@gnu.org; Tue, 06 Nov 2018 04:54:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJy2x-0004jW-Bm for guix-patches@gnu.org; Tue, 06 Nov 2018 04:53:22 -0500 Received: from flashner.co.il ([178.62.234.194]:58406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJy2x-0004fp-1u for guix-patches@gnu.org; Tue, 06 Nov 2018 04:53:19 -0500 Received: from localhost (unknown [5.102.239.133]) by flashner.co.il (Postfix) with ESMTPSA id 793614005A for ; Tue, 6 Nov 2018 09:53:17 +0000 (UTC) Date: Tue, 6 Nov 2018 11:53:16 +0200 From: Efraim Flashner Message-ID: <20181106095316.GB1206@macbook41> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches I was looking at the help menu for 'guix pack' and I realized that I didn't know what formats were available and there wasn't a flag to show them. diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 83bfa4ce0..9056ada6d 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017, 2018 Ricardo Wurmus ;;; Copyright © 2018 Konrad Hinsen ;;; Copyright © 2018 Chris Marusich +;;; Copyright © 2018 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -551,6 +552,18 @@ please email '~a'~%") (squashfs . ,squashfs-image) (docker . ,docker-image))) +(define (show-formats) + ;; Print the supported pack formats. + (display (G_ "The supported formats for 'guix pack' are:")) + (newline) + (display (G_ " + tarball A self-contained tarball, ready to run on another machine.")) + (display (G_ " + squashfs A squashfs image, ready for 'cluster engines' and the like.")) + (display (G_ " + docker A tarball ready for 'docker load'.")) + (newline)) + (define %options ;; Specifications of the command-line options. (cons* (option '(#\h "help") #f #f @@ -567,6 +580,10 @@ please email '~a'~%") (option '(#\f "format") #t #f (lambda (opt name arg result) (alist-cons 'format (string->symbol arg) result))) + (option '("list-formats") #f #f + (lambda args + (show-formats) + (exit 0))) (option '(#\R "relocatable") #f #f (lambda (opt name arg result) (alist-cons 'relocatable? #t result))) @@ -621,6 +638,8 @@ Create a bundle of PACKAGE.\n")) (newline) (display (G_ " -f, --format=FORMAT build a pack in the given FORMAT")) + (display (G_ " + --list-formats list the formats available")) (display (G_ " -R, --relocatable produce relocatable executables")) (display (G_ "