GNU bug report logs - #56612
[PATCH] guix install: Add '--manifest' option.

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sun, 17 Jul 2022 10:21:01 UTC

Severity: normal

Tags: patch, wontfix

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56612 in the body.
You can then email your comments to 56612 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#56612; Package guix-patches. (Sun, 17 Jul 2022 10:21:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 17 Jul 2022 10:21:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH] guix install: Add '--manifest' option.
Date: Sun, 17 Jul 2022 12:20:35 +0200
* 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 <ludo <at> gnu.org>
+;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;;
 ;;; 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 <ludo <at> gnu.org>
+# Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo <at> gnu.org>
 #
 # 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" <<EOF
+(specifications->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





Information forwarded to guix-patches <at> gnu.org:
bug#56612; Package guix-patches. (Tue, 19 Jul 2022 10:02:01 GMT) Full text and rfc822 format available.

Message #8 received at 56612 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
To: Ludovic Courtès <ludo <at> gnu.org>, 56612 <at> debbugs.gnu.org
Subject: Re: [PATCH] guix install: Add '--manifest' option.
Date: Tue, 19 Jul 2022 12:01:04 +0200
Am Sonntag, dem 17.07.2022 um 12:20 +0200 schrieb Ludovic Courtès:
> * 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?  :-)
I think the semantics of `guix install -m' are somewhat unclear.  It
can mean both "add all of manifest to what I already have installed"
and "use manifest exactly as the manifest".  The latter is equivalent
to `guix package -m' (which has clearer semantics here) and also the
implementation chosen IIUC.  Personally, I don't think I'd want
"install" to remove packages.

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#56612; Package guix-patches. (Thu, 21 Jul 2022 09:11:01 GMT) Full text and rfc822 format available.

Message #11 received at 56612 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
Cc: 56612 <at> debbugs.gnu.org
Subject: Re: [PATCH] guix install: Add '--manifest' option.
Date: Thu, 21 Jul 2022 11:09:54 +0200
Hi,

Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at> skribis:

> Am Sonntag, dem 17.07.2022 um 12:20 +0200 schrieb Ludovic Courtès:
>> * 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?  :-)
> I think the semantics of `guix install -m' are somewhat unclear.  It
> can mean both "add all of manifest to what I already have installed"
> and "use manifest exactly as the manifest".  The latter is equivalent
> to `guix package -m' (which has clearer semantics here) and also the
> implementation chosen IIUC.  Personally, I don't think I'd want
> "install" to remove packages.

Right.  To me, ‘-m’ is always declarative: you get what the manifest
prescribes, nothing else; this is how it’s currently documented.

Do you think it could be interpreted as “add all of manifest to what I
already have installed”?

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#56612; Package guix-patches. (Thu, 21 Jul 2022 10:40:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>, guix-patches <at> gnu.org,
 56612 <at> debbugs.gnu.org
Subject: Re: [bug#56612] [PATCH] guix install: Add '--manifest' option.
Date: Thu, 21 Jul 2022 12:37:37 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès 写道:
> Do you think it could be interpreted as “add all of manifest to 
> what I
> already have installed”?

It can; I did.  I was going to raise the same objection as 
Liliana.  ‘guix package -m’ does not have this problem, ‘guix 
install -m’ does.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#56612; Package guix-patches. (Thu, 21 Jul 2022 10:40:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#56612; Package guix-patches. (Fri, 22 Jul 2022 21:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 56612 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: liliana.prikler <at> ist.tugraz.at, 56612 <at> debbugs.gnu.org
Subject: Re: bug#56612: [PATCH] guix install: Add '--manifest' option.
Date: Fri, 22 Jul 2022 22:58:56 +0200
Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> Ludovic Courtès 写道:
>> Do you think it could be interpreted as “add all of manifest to what
>> I
>> already have installed”?
>
> It can; I did.  I was going to raise the same objection as Liliana.
> ‘guix package -m’ does not have this problem, ‘guix install -m’ does.

OK, interesting.  I guess we can drop the idea then.

Thanks for your feedback!

Ludo’.




Added tag(s) wontfix. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 22 Jul 2022 21:00:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 56612 <at> debbugs.gnu.org and Ludovic Courtès <ludo <at> gnu.org> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 22 Jul 2022 21:00:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Aug 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.