From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SNP/NKfi02LKVQEAbAwnHQ (envelope-from ) for ; Sun, 17 Jul 2022 12:21:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oE0FNafi02IYcAEA9RJhRA (envelope-from ) for ; Sun, 17 Jul 2022 12:21:27 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 64A7FE0AF for ; Sun, 17 Jul 2022 12:21:27 +0200 (CEST) Received: from localhost ([::1]:57268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oD1Ow-0005iO-JW for larch@yhetil.org; Sun, 17 Jul 2022 06:21:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD1OY-0005hz-CK for guix-patches@gnu.org; Sun, 17 Jul 2022 06:21:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oD1OY-0003qX-3c for guix-patches@gnu.org; Sun, 17 Jul 2022 06:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oD1OX-0000bo-W3 for guix-patches@gnu.org; Sun, 17 Jul 2022 06:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56612] [PATCH] guix install: Add '--manifest' option. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Jul 2022 10:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56612 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56612@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16580532462296 (code B ref -1); Sun, 17 Jul 2022 10:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jul 2022 10:20:46 +0000 Received: from localhost ([127.0.0.1]:46777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD1OH-0000ax-Q9 for submit@debbugs.gnu.org; Sun, 17 Jul 2022 06:20:46 -0400 Received: from lists.gnu.org ([209.51.188.17]:44570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD1OG-0000aq-Fr for submit@debbugs.gnu.org; Sun, 17 Jul 2022 06:20:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD1OG-0005gE-Ai for guix-patches@gnu.org; Sun, 17 Jul 2022 06:20:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD1OF-0003ns-Af; Sun, 17 Jul 2022 06:20:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=w3fC0/ATU6fZw3dm/eqojhXMzwkD4zq9PbC2KmKvse4=; b=scEX3PiTWsoy2p trHrsm92GKhzkt3OFcVt3+eli3V0j15C0SIThyK6bPDdT+F42PrR1B95DfsO9mYc+lX5xifm+Aby9 n+YqbISZuIeW2jNmKNHesrcHQEqJXrrWZSvUmmlp7oRavMcgZxSqyX+yKLVpGVtmDvQiIJLIIEQ/s DTSJyhFTv0KSM3IUgOa1iy6awyuhzi84jIr0tmQX9kDWuHmYfNiOUz6QAvqat1O+NB3BY2xqFv+th GTcGTvpvhNQOmZ2WZR0z+YdVYw8ZJdXewTvPKtgd8nnEmNZBx+zvMWAY77ijlRthC+WXK7Zo40m9P WE1uma9wbfNH1Mllg/TA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51886 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oD1OE-0003Yk-Pq; Sun, 17 Jul 2022 06:20:42 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 17 Jul 2022 12:20:35 +0200 Message-Id: <20220717102035.9150-1-ludo@gnu.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658053287; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=w3fC0/ATU6fZw3dm/eqojhXMzwkD4zq9PbC2KmKvse4=; b=aVq4L29aiQl+GdUUJeFKga61kP9YtbI5j1R4Rx2WYmEyIzGdKJG0KV599dczRkid2wR58g 8gmyN5+KGf8ZlI82U3QcLToGt3AGlfNj3jOoIlZXhrxwuSIPKVFDpph7UjGEWoZY4pLrEC O/8JY8U9/5DKzZe1XjNjEZV3boxPEGnbaEko7YBiR55K4WTWKcnck9jX4G/a4Y4jHc3r9b 006AuC+ooFFjMMXEaQkoCdP1SbuJh+hK7RuiLMWtrvKmsot4sCcSh8R8j3SKjs3q/I3DB/ CDJRZZJKeW60gFucrjLWzyUokDZ6Y9yspnltv5E0Mxm82w+RtQ2xsPh9jyvEUg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658053287; a=rsa-sha256; cv=none; b=Yg6JRPd5Odxgn8FZh3E7+ybcLHOxn3RWe+RUQWe49+oDifoQFgjmbJklxwc3GaefIpdMi1 9jvcCRDVTMlLNqnILnUEDh+Sbyx4XzhbWZ8rfHod7D6I0V5S0WWi1+Vmu6pypeczNt0X5/ xlcAT5KDswFuzybJO5qqUrjRsxyTOfr7z5J+F8J3STuqkQNkfodcFa+3v3NpPsEGzKdbWw OhTKDx2nqS2dO5GUDXYCkVbeF6PpiP255rdlBPV4QYbRe+JRMe2JAjGGoFFOwNW3Zy+6E3 oVNefGVsiXIwase4VwuX/JDwRR0Osee95p/36Ya/vqCFEknKnff3jGo/iJdexw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=scEX3PiT; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.83 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=scEX3PiT; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 64A7FE0AF X-Spam-Score: -2.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: InW3CXXE7u0M * guix/scripts/install.scm (show-help, %options): Add "--manifest". * tests/guix-package-aliases.sh" Test "guix install -m". --- guix/scripts/install.scm | 8 ++++++-- tests/guix-package-aliases.sh | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) Hi! I think it’s convenient and quite natural to be able to type: guix install -m manifest.scm Hence this patch. Objections? :-) Thanks, Ludo’. diff --git a/guix/scripts/install.scm b/guix/scripts/install.scm index 63e625f266..0d24d7c956 100644 --- a/guix/scripts/install.scm +++ b/guix/scripts/install.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019, 2020 Ludovic Courtès +;;; Copyright © 2019, 2020, 2022 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +33,9 @@ (define (show-help) This is an alias for 'guix package -i'.\n")) (display (G_ " -p, --profile=PROFILE use PROFILE instead of the user's default profile")) + (display (G_ " + -m, --manifest=FILE create a new profile generation with the manifest + from FILE")) ;; '--bootstrap' not shown here. (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) @@ -61,7 +64,8 @@ (define %options ;; Preserve some of the 'guix package' options. (append (filter (lambda (option) (any (cut member <> (option-names option)) - '("profile" "dry-run" "verbosity" "bootstrap"))) + '("profile" "dry-run" "verbosity" "bootstrap" + "manifest"))) %package-options) %transformation-options diff --git a/tests/guix-package-aliases.sh b/tests/guix-package-aliases.sh index 311838b768..99cb9176cd 100644 --- a/tests/guix-package-aliases.sh +++ b/tests/guix-package-aliases.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2019, 2020 Ludovic Courtès +# Copyright © 2019, 2020, 2022 Ludovic Courtès # # This file is part of GNU Guix. # @@ -28,9 +28,10 @@ readlink_base () } profile="t-profile-$$" -rm -f "$profile" +manifest="t-manifest-$$" +rm -f "$profile" "$manifest" -trap 'rm -f "$profile" "$profile-"[0-9]*' EXIT +trap 'rm -f "$profile" "$profile-"[0-9]* "$manifest"' EXIT guix install --bootstrap guile-bootstrap -p "$profile" test -x "$profile/bin/guile" @@ -55,6 +56,15 @@ guix remove --bootstrap guile-bootstrap -p "$profile" ! test -x "$profile/bin/guile" test `guix package -p "$profile" -I | wc -l` -eq 0 +# Installing from a manifest. +cat > "$manifest" <manifest '("guile-bootstrap")) +EOF +guix install -p "$profile" -m "$manifest" --bootstrap +test -x "$profile/bin/guile" +guix remove --bootstrap guile-bootstrap -p "$profile" +! test -x "$profile/bin/guile" + ! guix remove -p "$profile" this-is-not-installed --bootstrap ! guix remove -i guile-bootstrap -p "$profile" --bootstrap -- 2.36.1