From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d60WH-00028X-Oy for guix-patches@gnu.org; Wed, 03 May 2017 16:05:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d60WE-0003bb-K1 for guix-patches@gnu.org; Wed, 03 May 2017 16:05:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55021) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d60WE-0003at-G5 for guix-patches@gnu.org; Wed, 03 May 2017 16:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d60WD-0003vn-PV for guix-patches@gnu.org; Wed, 03 May 2017 16:05:01 -0400 Subject: bug#26652: [PATCH 2/2] scripts: refresh: Add -m manifest option. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170425130024.9481-1-m.othacehe@gmail.com> <20170425130024.9481-2-m.othacehe@gmail.com> Date: Wed, 03 May 2017 22:04:24 +0200 In-Reply-To: <20170425130024.9481-2-m.othacehe@gmail.com> (Mathieu Othacehe's message of "Tue, 25 Apr 2017 15:00:24 +0200") Message-ID: <87r305r9kn.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: Mathieu Othacehe Cc: 26652@debbugs.gnu.org Mathieu Othacehe skribis: > * guix/scripts/refresh.scm (%options): Add -m option, > (show-help): document it, > (get-manifest-packages): new procedure, > (guix-refresh): use packages from manifest if specified, otherwise > keep the previous behaviour. This sounds useful! > (display (_ " > + -m, --manifest=3DFILE select all the packages in FILE manifest")) =E2=80=9Cselect all the package from the manifest in FILE=E2=80=9D maybe? > +(define (get-manifest-packages manifest) > + "Return the list of packages in loaded MANIFEST." > + (let* ((user-module (make-user-module '((guix profiles) (gnu)))) > + (manifest (load* manifest user-module))) > + (manifest->packages manifest))) With =E2=80=98manifest->packages=E2=80=99 moved in this module, that would = be fine. Also, maybe s/get-manifest-packages/packages-from-manifest/, because =E2=80=98get-=E2=80=99 is quite unusual. :-) > + (packages > + (or manifest-packages args-packages))) Maybe (append (match (assoc-ref opts 'manifest) (#f '()) ((? string? file) (packages-from-manifest file))) args-packages) ? Could you also update guix.texi to mention this option and the intended use case? Thank you! Ludo=E2=80=99.