* [bug#47163] [PATCH] refresh: Add '--installed' option.
@ 2021-03-15 15:45 Xinglu Chen
2021-03-15 20:38 ` Ludovic Courtès
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Xinglu Chen @ 2021-03-15 15:45 UTC (permalink / raw)
To: 47163
This lets the user to only check for updates for packages installed in the
current profile.
If the user is using the imperative way to install packages, or uses
multiple manifests, this is a quick way to check for updates for the
installed packages.
* guix/scripts/refresh.scm (%options): Add '--installed' option.
* guix.texi (Invoking guix refresh): Document it.
---
doc/guix.texi | 5 +++++
guix/scripts/refresh.scm | 14 +++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3e7ffc81bc..c778a877d8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11657,6 +11657,11 @@
Select all the packages from the manifest in @var{file}. This is useful to
check if any packages of the user manifest can be updated.
+@item --installed
+@itemx -i
+Select all the packages installed in the current profile. This is
+useful to check if any of the packages the user is using can be updated.
+
@item --type=@var{updater}
@itemx -t @var{updater}
Select only packages handled by @var{updater} (may be a comma-separated
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm
index fb6c52a567..c1c672dc0b 100644
--- a/guix/scripts/refresh.scm
+++ b/guix/scripts/refresh.scm
@@ -86,6 +86,9 @@
(option '(#\m "manifest") #t #f
(lambda (opt name arg result)
(alist-cons 'manifest arg result)))
+ (option '(#\i "installed") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'installed #t result)))
(option '(#\e "expression") #t #f
(lambda (opt name arg result)
(alist-cons 'expression arg result)))
@@ -156,6 +159,9 @@ specified with `--select'.\n"))
(display (G_ "
-m, --manifest=FILE select all the packages from the manifest in FILE"))
(display (G_ "
+ -i --installed select all the packages installed in the current
+ profile"))
+ (display (G_ "
-t, --type=UPDATER,... restrict to updates from the specified updaters
(e.g., 'gnu')"))
(display (G_ "
@@ -253,7 +259,13 @@ update would trigger a complete rebuild."
(define packages
(match (assoc-ref opts 'manifest)
- (#f args-packages)
+ (#f (if (assoc-ref opts 'installed)
+ ;; All packages installed in current profile
+ (manifest->packages
+ (match (manifest->code (profile-manifest %current-profile))
+ (('begin expr) (eval expr
+ (make-user-module '((gnu packages)))))))
+ args-packages))
((? string? file) (packages-from-manifest file))))
(if (assoc-ref opts 'recursive?)
base-commit: 266d55dc3080475544bf45e72359c9b9bbcecd53
--
2.30.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] refresh: Add '--installed' option.
2021-03-15 15:45 [bug#47163] [PATCH] refresh: Add '--installed' option Xinglu Chen
@ 2021-03-15 20:38 ` Ludovic Courtès
2021-03-15 21:14 ` Xinglu Chen
2021-03-16 16:19 ` [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages Xinglu Chen
2021-03-26 17:18 ` bug#47163: [PATCH] refresh: Add '--installed' option Xinglu Chen
2 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2021-03-15 20:38 UTC (permalink / raw)
To: Xinglu Chen; +Cc: 47163
Hi,
Xinglu Chen <public@yoctocell.xyz> skribis:
> This lets the user to only check for updates for packages installed in the
> current profile.
>
> If the user is using the imperative way to install packages, or uses
> multiple manifests, this is a quick way to check for updates for the
> installed packages.
>
> * guix/scripts/refresh.scm (%options): Add '--installed' option.
> * guix.texi (Invoking guix refresh): Document it.
I sometimes run:
guix refresh $(guix package -I | cut -f1)
I’m not sure an extra ‘guix refresh’ option is warranted. WDYT?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] refresh: Add '--installed' option.
2021-03-15 20:38 ` Ludovic Courtès
@ 2021-03-15 21:14 ` Xinglu Chen
2021-03-16 9:08 ` Ludovic Courtès
0 siblings, 1 reply; 18+ messages in thread
From: Xinglu Chen @ 2021-03-15 21:14 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 47163
On Mon, Mar 15 2021, Ludovic Courtès wrote:
> Hi,
>
> Xinglu Chen <public@yoctocell.xyz> skribis:
>
>> This lets the user to only check for updates for packages installed in the
>> current profile.
>>
>> If the user is using the imperative way to install packages, or uses
>> multiple manifests, this is a quick way to check for updates for the
>> installed packages.
>>
>> * guix/scripts/refresh.scm (%options): Add '--installed' option.
>> * guix.texi (Invoking guix refresh): Document it.
>
> I sometimes run:
>
> guix refresh $(guix package -I | cut -f1)
>
> I’m not sure an extra ‘guix refresh’ option is warranted. WDYT?
That's cool, I think your solution would suffice. Maybe we could add it
to the manual or cookbok?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] refresh: Add '--installed' option.
2021-03-15 21:14 ` Xinglu Chen
@ 2021-03-16 9:08 ` Ludovic Courtès
2021-03-16 9:16 ` Léo Le Bouter via Guix-patches via
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Ludovic Courtès @ 2021-03-16 9:08 UTC (permalink / raw)
To: Xinglu Chen; +Cc: 47163
Hi,
Xinglu Chen <public@yoctocell.xyz> skribis:
> On Mon, Mar 15 2021, Ludovic Courtès wrote:
>
>> Hi,
>>
>> Xinglu Chen <public@yoctocell.xyz> skribis:
>>
>>> This lets the user to only check for updates for packages installed in the
>>> current profile.
>>>
>>> If the user is using the imperative way to install packages, or uses
>>> multiple manifests, this is a quick way to check for updates for the
>>> installed packages.
>>>
>>> * guix/scripts/refresh.scm (%options): Add '--installed' option.
>>> * guix.texi (Invoking guix refresh): Document it.
>>
>> I sometimes run:
>>
>> guix refresh $(guix package -I | cut -f1)
>>
>> I’m not sure an extra ‘guix refresh’ option is warranted. WDYT?
>
> That's cool, I think your solution would suffice. Maybe we could add it
> to the manual or cookbok?
That’s a good idea. Do you want to propose a short section on this?
You may also like the new ‘--with-latest’ package transformation
option. :-)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] refresh: Add '--installed' option.
2021-03-16 9:08 ` Ludovic Courtès
@ 2021-03-16 9:16 ` Léo Le Bouter via Guix-patches via
2021-03-16 12:58 ` zimoun
2021-03-16 16:05 ` Xinglu Chen
2021-03-16 16:44 ` [bug#47163] Using package transformations declaratively (was: [bug#47163] [PATCH] refresh: Add '--installed' option.) Xinglu Chen
2 siblings, 1 reply; 18+ messages in thread
From: Léo Le Bouter via Guix-patches via @ 2021-03-16 9:16 UTC (permalink / raw)
To: Ludovic Courtès, Xinglu Chen; +Cc: 47163
[-- Attachment #1: Type: text/plain, Size: 1767 bytes --]
On Tue, 2021-03-16 at 10:08 +0100, Ludovic Courtès wrote:
> Hi,
>
> Xinglu Chen <public@yoctocell.xyz> skribis:
>
> > On Mon, Mar 15 2021, Ludovic Courtès wrote:
> >
> > > Hi,
> > >
> > > Xinglu Chen <public@yoctocell.xyz> skribis:
> > >
> > > > This lets the user to only check for updates for packages
> > > > installed in the
> > > > current profile.
> > > >
> > > > If the user is using the imperative way to install packages, or
> > > > uses
> > > > multiple manifests, this is a quick way to check for updates
> > > > for the
> > > > installed packages.
> > > >
> > > > * guix/scripts/refresh.scm (%options): Add '--installed'
> > > > option.
> > > > * guix.texi (Invoking guix refresh): Document it.
> > >
> > > I sometimes run:
> > >
> > > guix refresh $(guix package -I | cut -f1)
> > >
> > > I’m not sure an extra ‘guix refresh’ option is warranted. WDYT?
> >
> > That's cool, I think your solution would suffice. Maybe we could
> > add it
> > to the manual or cookbok?
>
> That’s a good idea. Do you want to propose a short section on this?
>
> You may also like the new ‘--with-latest’ package transformation
> option. :-)
>
> Thanks,
> Ludo’.
I would also really like such option for 'lint' and 'refresh' that can
take an operating-system definition so I can ensure a certain set of
packages are up to some standards and help me focus my efforts on my or
some fellow's configuration (especially w.r.t. security), rather than
randomly trying to maintain *everything* in the GNU Guix repo which is
quite exhausting and large work to take on. Starting from a place of
actual need for myself and some fellow's configurations looks like a
more achieveable goal mid-term.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] refresh: Add '--installed' option.
2021-03-16 9:16 ` Léo Le Bouter via Guix-patches via
@ 2021-03-16 12:58 ` zimoun
2021-03-16 13:10 ` Léo Le Bouter via Guix-patches via
0 siblings, 1 reply; 18+ messages in thread
From: zimoun @ 2021-03-16 12:58 UTC (permalink / raw)
To: Léo Le Bouter; +Cc: Ludovic Courtès, Xinglu Chen, 47163
Hi Léo,
On Tue, 16 Mar 2021 at 10:18, Léo Le Bouter via Guix-patches via
<guix-patches@gnu.org> wrote:
> I would also really like such option for 'lint' and 'refresh' that can
> take an operating-system definition so I can ensure a certain set of
> packages are up to some standards and help me focus my efforts on my or
> some fellow's configuration (especially w.r.t. security), rather than
> randomly trying to maintain *everything* in the GNU Guix repo which is
> quite exhausting and large work to take on. Starting from a place of
> actual need for myself and some fellow's configurations looks like a
> more achieveable goal mid-term.
Adding the manifest option to "guix lint", is it not enough? I do not
know how many packages you have in your operating-system definition
but from my understanding your user-wide packages should be in
manifest.scm files, and you could also maintain a manifest.scm file
for your packages system-wide. Anyway.
Here an example with an hard-coded path, saved in /tmp/manifest-from-os.scm:
--8<---------------cut here---------------start------------->8---
(use-modules
(gnu system)
(guix profiles))
(define os
(load "/home/simon/src/guix/guix/gnu/system/examples/bare-bones.tmpl"))
(define pkgs (operating-system-packages os))
(packages->manifest pkgs)
--8<---------------cut here---------------end--------------->8---
Then "guix refresh -m /tmp/manifest-from-os.scm" should do the job.
Well, it is an example, the point is simply to show that an option is
not necessary, IMHO. However, a robust script could be in etc/ with
some other tools and with a line in the manual. Maybe. :-)
It seems better to keep separated what operates on packages and what
operates on system.
Cheers,
simon
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] refresh: Add '--installed' option.
2021-03-16 12:58 ` zimoun
@ 2021-03-16 13:10 ` Léo Le Bouter via Guix-patches via
0 siblings, 0 replies; 18+ messages in thread
From: Léo Le Bouter via Guix-patches via @ 2021-03-16 13:10 UTC (permalink / raw)
To: zimoun; +Cc: Ludovic Courtès, Xinglu Chen, 47163
[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]
On Tue, 2021-03-16 at 13:58 +0100, zimoun wrote:
> Adding the manifest option to "guix lint", is it not enough? I do
> not
> know how many packages you have in your operating-system definition
> but from my understanding your user-wide packages should be in
> manifest.scm files, and you could also maintain a manifest.scm file
> for your packages system-wide. Anyway.
>
> Here an example with an hard-coded path, saved in /tmp/manifest-from-
> os.scm:
>
> --8<---------------cut here---------------start------------->8---
> (use-modules
> (gnu system)
> (guix profiles))
>
> (define os
> (load "/home/simon/src/guix/guix/gnu/system/examples/bare-
> bones.tmpl"))
>
> (define pkgs (operating-system-packages os))
>
> (packages->manifest pkgs)
> --8<---------------cut here---------------end--------------->8---
>
> Then "guix refresh -m /tmp/manifest-from-os.scm" should do the job.
> Well, it is an example, the point is simply to show that an option is
> not necessary, IMHO. However, a robust script could be in etc/ with
> some other tools and with a line in the manual. Maybe. :-)
> It seems better to keep separated what operates on packages and what
> operates on system.
>
>
> Cheers,
> simon
You are right that looks great!
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] refresh: Add '--installed' option.
2021-03-16 9:08 ` Ludovic Courtès
2021-03-16 9:16 ` Léo Le Bouter via Guix-patches via
@ 2021-03-16 16:05 ` Xinglu Chen
2021-03-16 16:44 ` [bug#47163] Using package transformations declaratively (was: [bug#47163] [PATCH] refresh: Add '--installed' option.) Xinglu Chen
2 siblings, 0 replies; 18+ messages in thread
From: Xinglu Chen @ 2021-03-16 16:05 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 47163
On Tue, Mar 16 2021, Ludovic Courtès wrote:
>>> I sometimes run:
>>>
>>> guix refresh $(guix package -I | cut -f1)
>>>
>>> I’m not sure an extra ‘guix refresh’ option is warranted. WDYT?
>>
>> That's cool, I think your solution would suffice. Maybe we could add it
>> to the manual or cookbok?
>
> That’s a good idea. Do you want to propose a short section on this?
Sure, I will send a followup patch to this.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages
2021-03-15 15:45 [bug#47163] [PATCH] refresh: Add '--installed' option Xinglu Chen
2021-03-15 20:38 ` Ludovic Courtès
@ 2021-03-16 16:19 ` Xinglu Chen
2021-03-16 18:06 ` Ludovic Courtès
2021-03-17 12:23 ` [bug#47213] [PATCH v2] doc: Add snippet for running 'guix refresh' on installed Xinglu Chen
2021-03-26 17:18 ` bug#47163: [PATCH] refresh: Add '--installed' option Xinglu Chen
2 siblings, 2 replies; 18+ messages in thread
From: Xinglu Chen @ 2021-03-16 16:19 UTC (permalink / raw)
To: 47163; +Cc: Ludovic Courtès
* doc/guix.texi (Invoking guix refresh): Add snippet that runs 'guix refresh'
on all the packages installed in the current profile.
---
doc/guix.texi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3e7ffc81bc..752dce9072 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11722,6 +11722,16 @@
@code{idutils} packages. The @option{--select} option would have no
effect in this case.
+You can also quickly update all the packages installed in the current
+profile with the following snippet:
+
+@example
+$ guix refresh -u $(guix package --list-installed | cut -f1)
+@end example
+
+This is handy if you don't use manifests for installing packages into
+your profile.
+
When considering whether to upgrade a package, it is sometimes
convenient to know which packages would be affected by the upgrade and
should be checked for compatibility. For this the following option may
base-commit: 266d55dc3080475544bf45e72359c9b9bbcecd53
--
2.30.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#47163] Using package transformations declaratively (was: [bug#47163] [PATCH] refresh: Add '--installed' option.)
2021-03-16 9:08 ` Ludovic Courtès
2021-03-16 9:16 ` Léo Le Bouter via Guix-patches via
2021-03-16 16:05 ` Xinglu Chen
@ 2021-03-16 16:44 ` Xinglu Chen
[not found] ` <CAJ3okZ1OWCT07n17Wo0c_Par3gO1mEE6_Y_Zy=eFnTJZ5Ec2sw@mail.gmail.com>
2 siblings, 1 reply; 18+ messages in thread
From: Xinglu Chen @ 2021-03-16 16:44 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel, 47163
On Tue, Mar 16 2021, Ludovic Courtès wrote:
> You may also like the new ‘--with-latest’ package transformation
> option. :-)
I really like package transformations but is there a way to use specify
them with Guile so I can use them with `guix home`[1] or in manifests?
Ccing guix-devel
[1]: https://yhetil.org/guix-devel/878s6u2pco.fsf@trop.in
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages
2021-03-16 16:19 ` [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages Xinglu Chen
@ 2021-03-16 18:06 ` Ludovic Courtès
2021-03-16 18:34 ` Xinglu Chen
2021-03-17 12:23 ` [bug#47213] [PATCH v2] doc: Add snippet for running 'guix refresh' on installed Xinglu Chen
1 sibling, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2021-03-16 18:06 UTC (permalink / raw)
To: Xinglu Chen; +Cc: 47163
Hi,
Xinglu Chen <public@yoctocell.xyz> skribis:
> * doc/guix.texi (Invoking guix refresh): Add snippet that runs 'guix refresh'
> on all the packages installed in the current profile.
[...]
> +You can also quickly update all the packages installed in the current
> +profile with the following snippet:
> +
> +@example
> +$ guix refresh -u $(guix package --list-installed | cut -f1)
> +@end example
> +
> +This is handy if you don't use manifests for installing packages into
> +your profile.
Note that if you type this literally, it fails along these lines:
--8<---------------cut here---------------start------------->8---
$ guix refresh -u grep
Starting download of /tmp/guix-file.yLXS45
From https://ftpmirror.gnu.org/gnu/grep/grep-3.6.tar.xz...
following redirection to `https://gnu.mirror.constant.com/grep/grep-3.6.tar.xz'...
…6.tar.xz 1.5MiB 2.3MiB/s 00:01 [##################] 100.0%
Starting download of /tmp/guix-file.NgvvW4
From https://ftpmirror.gnu.org/gnu/grep/grep-3.6.tar.xz.sig...
following redirection to `https://mirrors.ocf.berkeley.edu/gnu/grep/grep-3.6.tar.xz.sig'...
…tar.xz.sig 833B 1.8MiB/s 00:00 [##################] 100.0%
gpgv: Signature made Mon 09 Nov 2020 05:40:03 AM CET
gpgv: using RSA key 155D3FC500C834486D1EEA677FD9FCCB000BEEEE
gpgv: Good signature from "Jim Meyering <jim@meyering.net>"
gpgv: aka "Jim Meyering <meyering@fb.com>"
gpgv: aka "Jim Meyering <meyering@gnu.org>"
gnu/packages/base.scm:99:12: grep: updating from version 3.4 to version 3.6...
guix refresh: error: mkstemp!: Read-only file system
--8<---------------cut here---------------end--------------->8---
So I think this example may be misleading. We could instead suggest
./pre-inst-env, with a link to “Running Guix Before It Is Installed”,
and possibly mention the ‘--with-latest’ option as well.
WDYT?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages
2021-03-16 18:06 ` Ludovic Courtès
@ 2021-03-16 18:34 ` Xinglu Chen
2021-03-18 9:31 ` Ludovic Courtès
0 siblings, 1 reply; 18+ messages in thread
From: Xinglu Chen @ 2021-03-16 18:34 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 47163
On Tue, Mar 16 2021, Ludovic Courtès wrote:
>> * doc/guix.texi (Invoking guix refresh): Add snippet that runs 'guix refresh'
>> on all the packages installed in the current profile.
>
> [...]
>
>> +You can also quickly update all the packages installed in the current
>> +profile with the following snippet:
>> +
>> +@example
>> +$ guix refresh -u $(guix package --list-installed | cut -f1)
>> +@end example
>> +
>> +This is handy if you don't use manifests for installing packages into
>> +your profile.
>
> Note that if you type this literally, it fails along these lines:
>
> --8<---------------cut here---------------start------------->8---
> $ guix refresh -u grep
>
> Starting download of /tmp/guix-file.yLXS45
> From https://ftpmirror.gnu.org/gnu/grep/grep-3.6.tar.xz...
> following redirection to `https://gnu.mirror.constant.com/grep/grep-3.6.tar.xz'...
> …6.tar.xz 1.5MiB 2.3MiB/s 00:01 [##################] 100.0%
>
> Starting download of /tmp/guix-file.NgvvW4
> From https://ftpmirror.gnu.org/gnu/grep/grep-3.6.tar.xz.sig...
> following redirection to `https://mirrors.ocf.berkeley.edu/gnu/grep/grep-3.6.tar.xz.sig'...
> …tar.xz.sig 833B 1.8MiB/s 00:00 [##################] 100.0%
> gpgv: Signature made Mon 09 Nov 2020 05:40:03 AM CET
> gpgv: using RSA key 155D3FC500C834486D1EEA677FD9FCCB000BEEEE
> gpgv: Good signature from "Jim Meyering <jim@meyering.net>"
> gpgv: aka "Jim Meyering <meyering@fb.com>"
> gpgv: aka "Jim Meyering <meyering@gnu.org>"
> gnu/packages/base.scm:99:12: grep: updating from version 3.4 to version 3.6...
> guix refresh: error: mkstemp!: Read-only file system
> --8<---------------cut here---------------end--------------->8---
>
> So I think this example may be misleading. We could instead suggest
> ./pre-inst-env, with a link to “Running Guix Before It Is Installed”,
> and possibly mention the ‘--with-latest’ option as well.
>
> WDYT?
Sorry, I should have tested the command... When you say "--with-latest",
do you mean `guix package -i grep --with-latest`?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47163] Using package transformations declaratively (was: [bug#47163] [PATCH] refresh: Add '--installed' option.)
[not found] ` <CAJ3okZ1OWCT07n17Wo0c_Par3gO1mEE6_Y_Zy=eFnTJZ5Ec2sw@mail.gmail.com>
@ 2021-03-16 18:35 ` Xinglu Chen
0 siblings, 0 replies; 18+ messages in thread
From: Xinglu Chen @ 2021-03-16 18:35 UTC (permalink / raw)
To: zimoun; +Cc: Guix Devel, 47163
On Tue, Mar 16 2021, zimoun wrote:
>> I really like package transformations but is there a way to use specify
>> them with Guile so I can use them with `guix home`[1] or in manifests?
>
> There is several ways to have package transformations at the manifest
> level. One is:
>
> --8<---------------cut here---------------start------------->8---
> (use-modules (guix transformations))
>
> (define transform1
> (options->transformation
> '((with-c-toolchain . "hello=gcc-toolchain@8"))))
>
> (packages->manifest
> (list (transform1 (specification->package "hello"))))
> --8<---------------cut here---------------end--------------->8---
Cool, thanks for the help.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47213] [PATCH v2] doc: Add snippet for running 'guix refresh' on installed
2021-03-16 16:19 ` [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages Xinglu Chen
2021-03-16 18:06 ` Ludovic Courtès
@ 2021-03-17 12:23 ` Xinglu Chen
2021-03-25 16:15 ` Xinglu Chen
2021-03-25 23:21 ` bug#47213: " Ludovic Courtès
1 sibling, 2 replies; 18+ messages in thread
From: Xinglu Chen @ 2021-03-17 12:23 UTC (permalink / raw)
To: 47213
* doc/guix.texi (Invoking guix refresh): Add snippet that runs 'guix refresh'
on all the packages installed in the current profile.
---
Changes since v1:
- Correct the example snippet.
- Refer the reader to "Running Guix Before It Is Installed".
- Add suggestion to run `guix package -i --with-latest`.
doc/guix.texi | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 410670e639..d94772d5be 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -87,6 +87,7 @@
Copyright @copyright{} 2020 John Soo@*
Copyright @copyright{} 2020 Jonathan Brielmaier@*
Copyright @copyright{} 2020 Edgar Vincent@*
+Copyright @copyright{} 2021 Xinglu Chen@*
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -11719,8 +11720,21 @@
@noindent
The command above specifically updates the @code{emacs} and
-@code{idutils} packages. The @option{--select} option would have no
-effect in this case.
+@code{idutils} packages (see @pxref{Running Guix Before It Is
+Installed}). The @option{--select} option would have no effect in this
+case.
+
+You can also quickly update all the packages installed in the current
+profile with the following snippet:
+
+@example
+$ ./pre-inst-env guix refresh -u $(guix package --list-installed | cut -f1)
+@end example
+
+This is handy if you don't use manifests for installing packages into
+your profile. If you just want to install the latest version of a
+package, run @command{guix package -i --with-latest} (see @pxref{Package
+Transformation Options}).
When considering whether to upgrade a package, it is sometimes
convenient to know which packages would be affected by the upgrade and
base-commit: 109f58444beecd1b9b7c502f2a687a6b91c62dc0
--
2.30.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages
2021-03-16 18:34 ` Xinglu Chen
@ 2021-03-18 9:31 ` Ludovic Courtès
0 siblings, 0 replies; 18+ messages in thread
From: Ludovic Courtès @ 2021-03-18 9:31 UTC (permalink / raw)
To: Xinglu Chen; +Cc: 47163
Xinglu Chen <public@yoctocell.xyz> skribis:
> On Tue, Mar 16 2021, Ludovic Courtès wrote:
[...]
>> So I think this example may be misleading. We could instead suggest
>> ./pre-inst-env, with a link to “Running Guix Before It Is Installed”,
>> and possibly mention the ‘--with-latest’ option as well.
>>
>> WDYT?
>
> Sorry, I should have tested the command... When you say "--with-latest",
> do you mean `guix package -i grep --with-latest`?
Yes, see the “Package Transformation Options” section of the manual.
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#47213] [PATCH v2] doc: Add snippet for running 'guix refresh' on installed
2021-03-17 12:23 ` [bug#47213] [PATCH v2] doc: Add snippet for running 'guix refresh' on installed Xinglu Chen
@ 2021-03-25 16:15 ` Xinglu Chen
2021-03-25 23:21 ` bug#47213: " Ludovic Courtès
1 sibling, 0 replies; 18+ messages in thread
From: Xinglu Chen @ 2021-03-25 16:15 UTC (permalink / raw)
To: 47213; +Cc: Ludovic Courtès
On Wed, Mar 17 2021, Xinglu Chen wrote:
> * doc/guix.texi (Invoking guix refresh): Add snippet that runs 'guix refresh'
> on all the packages installed in the current profile.
Friendly ping! :)
I just realized that I started a new bug with the v2 patch, apologies
for the mess I have created.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#47213: [PATCH v2] doc: Add snippet for running 'guix refresh' on installed
2021-03-17 12:23 ` [bug#47213] [PATCH v2] doc: Add snippet for running 'guix refresh' on installed Xinglu Chen
2021-03-25 16:15 ` Xinglu Chen
@ 2021-03-25 23:21 ` Ludovic Courtès
1 sibling, 0 replies; 18+ messages in thread
From: Ludovic Courtès @ 2021-03-25 23:21 UTC (permalink / raw)
To: Xinglu Chen; +Cc: 47213-done
Hi!
Xinglu Chen <public@yoctocell.xyz> skribis:
> * doc/guix.texi (Invoking guix refresh): Add snippet that runs 'guix refresh'
> on all the packages installed in the current profile.
> ---
> Changes since v1:
> - Correct the example snippet.
> - Refer the reader to "Running Guix Before It Is Installed".
> - Add suggestion to run `guix package -i --with-latest`.
>
> doc/guix.texi | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 410670e639..d94772d5be 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -87,6 +87,7 @@
> Copyright @copyright{} 2020 John Soo@*
> Copyright @copyright{} 2020 Jonathan Brielmaier@*
> Copyright @copyright{} 2020 Edgar Vincent@*
> +Copyright @copyright{} 2021 Xinglu Chen@*
>
> Permission is granted to copy, distribute and/or modify this document
> under the terms of the GNU Free Documentation License, Version 1.3 or
> @@ -11719,8 +11720,21 @@
>
> @noindent
> The command above specifically updates the @code{emacs} and
> -@code{idutils} packages. The @option{--select} option would have no
> -effect in this case.
> +@code{idutils} packages (see @pxref{Running Guix Before It Is
> +Installed}). The @option{--select} option would have no effect in this
> +case.
> +
> +You can also quickly update all the packages installed in the current
> +profile with the following snippet:
> +
> +@example
> +$ ./pre-inst-env guix refresh -u $(guix package --list-installed | cut -f1)
> +@end example
> +
> +This is handy if you don't use manifests for installing packages into
> +your profile. If you just want to install the latest version of a
> +package, run @command{guix package -i --with-latest} (see @pxref{Package
> +Transformation Options}).
I pushed a variant of this as commit
3cb1136780108aebe45794e639b4a8c06460c7e3 and related commits.
Thank you, and apologies for the delay!
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#47163: [PATCH] refresh: Add '--installed' option.
2021-03-15 15:45 [bug#47163] [PATCH] refresh: Add '--installed' option Xinglu Chen
2021-03-15 20:38 ` Ludovic Courtès
2021-03-16 16:19 ` [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages Xinglu Chen
@ 2021-03-26 17:18 ` Xinglu Chen
2 siblings, 0 replies; 18+ messages in thread
From: Xinglu Chen @ 2021-03-26 17:18 UTC (permalink / raw)
To: 47163-done
The v2 patch has been applied. Closing.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2021-03-26 17:20 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-15 15:45 [bug#47163] [PATCH] refresh: Add '--installed' option Xinglu Chen
2021-03-15 20:38 ` Ludovic Courtès
2021-03-15 21:14 ` Xinglu Chen
2021-03-16 9:08 ` Ludovic Courtès
2021-03-16 9:16 ` Léo Le Bouter via Guix-patches via
2021-03-16 12:58 ` zimoun
2021-03-16 13:10 ` Léo Le Bouter via Guix-patches via
2021-03-16 16:05 ` Xinglu Chen
2021-03-16 16:44 ` [bug#47163] Using package transformations declaratively (was: [bug#47163] [PATCH] refresh: Add '--installed' option.) Xinglu Chen
[not found] ` <CAJ3okZ1OWCT07n17Wo0c_Par3gO1mEE6_Y_Zy=eFnTJZ5Ec2sw@mail.gmail.com>
2021-03-16 18:35 ` Xinglu Chen
2021-03-16 16:19 ` [bug#47163] [PATCH] doc: Add snippet for running 'guix refresh' on installed packages Xinglu Chen
2021-03-16 18:06 ` Ludovic Courtès
2021-03-16 18:34 ` Xinglu Chen
2021-03-18 9:31 ` Ludovic Courtès
2021-03-17 12:23 ` [bug#47213] [PATCH v2] doc: Add snippet for running 'guix refresh' on installed Xinglu Chen
2021-03-25 16:15 ` Xinglu Chen
2021-03-25 23:21 ` bug#47213: " Ludovic Courtès
2021-03-26 17:18 ` bug#47163: [PATCH] refresh: Add '--installed' option Xinglu Chen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).