Profile changes after ‘guix upgrade --dry-run’

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tirifto
Owner
unassigned
Submitted by
Tirifto
Severity
normal
T
T
Tirifto wrote on 14 Jan 2022 20:19
(address . bug-guix@gnu.org)
20220114201917.11b840fb@Jado
Hello! I recently had some issues with my setup, which had me rolling
my generations back and forth in attempt to fix them. My configuration
was at fault, but I did find an unrelated bug in Guix while at it:

When I run ‘guix package --rollback’, Guix switches to the previous
generation. But then, when I run ‘guix upgrade --dry-run’ to see what
would change again, my profile (~/.guix-profile/etc/profile) is actually
upgraded to the new generation. I should expect ‘--dry-run’ to leave my
profile untouched.

$ guix describe
Generation 17 Jan 13 2022 18:00:35 (current)
guix 175915b
branch: master
commit: 175915bb4417e198f6b500901dcef710a0011be9

I am using Guix as an additional package manager on top of
Trisquel GNU/Linux 9 ‘Etiona’.

Best of wishes
// Tirifto
L
L
Ludovic Courtès wrote on 14 Jan 2022 22:38
(name . Tirifto)(address . tirifto@posteo.cz)(address . 53267@debbugs.gnu.org)
87lezi2e1f.fsf@gnu.org
Hello,

Tirifto <tirifto@posteo.cz> skribis:

Toggle quote (6 lines)
> When I run ‘guix package --rollback’, Guix switches to the previous
> generation. But then, when I run ‘guix upgrade --dry-run’ to see what
> would change again, my profile (~/.guix-profile/etc/profile) is actually
> upgraded to the new generation. I should expect ‘--dry-run’ to leave my
> profile untouched.

It seems I cannot reproduce it. Specifically, ‘guix upgrade --dry-run’
really does a dry run, displaying “XYZ MB would be downloaded” (note
“would”) and then exiting without downloading or building any of the
packages.

What output to you get exactly?

Thanks,
Ludo’.
T
T
Tirifto wrote on 14 Jan 2022 23:08
(name . Ludovic Courtès)(address . ludo@gnu.org)
20220114230848.3456cd70@Jado
On Fri, 14 Jan 2022 22:38:52 +0100
Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (5 lines)
> It seems I cannot reproduce it. Specifically, ‘guix upgrade
> --dry-run’ really does a dry run, displaying “XYZ MB would be
> downloaded” (note “would”) and then exiting without downloading or
> building any of the packages.

In my case, I have already done the same upgrade before and haven’t
done a new pull since; therefore all the packages to be upgraded to are
already in Guix’s store.

‘guix upgrade --dry-run’ also tells me which packages ‘would be’
removed/upgraded/installed, and yet it edits my profile, changing the
environment variables it sets to new destinations.

Toggle quote (2 lines)
> What output to you get exactly?

$ guix package --rollback
switched from generation 20 to 19

$ guix upgrade --dry-run
guix upgrade: package 'gs-fonts' has been superseded by
'font-ghostscript' The following package would be removed:
gs-fonts 8.11

The following packages would be upgraded:
dav1d (dependencies or package changed)
emacs (dependencies or package changed)
font-dejavu (dependencies or package changed)
font-gnu-freefont (dependencies or package changed)
fontconfig 2.13.1 → 2.13.94
gimp (dependencies or package changed)
glibc-utf8-locales 2.31 → 2.33
nss-certs 3.59 → 3.71
teeworlds (dependencies or package changed)
ungoogled-chromium 96.0.4664.45-1 → 97.0.4692.71-1
youtube-dl 2021.06.06 → 2021.12.17

The following package would be installed:
font-ghostscript 8.11

$ guix package --rollback
switched from generation 20 to 19

I suppose I could keep repeating these two commands ad infinitum. :-)
Doing ‘guix package -I’ after ‘guix upgrade --dry-run’ likewise shows
the new package versions.

Toggle quote (3 lines)
> Thanks,
> Ludo’.

Thank you
// Tirifto
L
L
Ludovic Courtès wrote on 17 Jan 2022 16:35
(name . Tirifto)(address . tirifto@posteo.cz)(address . 53267@debbugs.gnu.org)
87wniyml2z.fsf@gnu.org
Hi,

Tirifto <tirifto@posteo.cz> skribis:

Toggle quote (27 lines)
> $ guix package --rollback
> switched from generation 20 to 19
>
> $ guix upgrade --dry-run
> guix upgrade: package 'gs-fonts' has been superseded by
> 'font-ghostscript' The following package would be removed:
> gs-fonts 8.11
>
> The following packages would be upgraded:
> dav1d (dependencies or package changed)
> emacs (dependencies or package changed)
> font-dejavu (dependencies or package changed)
> font-gnu-freefont (dependencies or package changed)
> fontconfig 2.13.1 → 2.13.94
> gimp (dependencies or package changed)
> glibc-utf8-locales 2.31 → 2.33
> nss-certs 3.59 → 3.71
> teeworlds (dependencies or package changed)
> ungoogled-chromium 96.0.4664.45-1 → 97.0.4692.71-1
> youtube-dl 2021.06.06 → 2021.12.17
>
> The following package would be installed:
> font-ghostscript 8.11
>
> $ guix package --rollback
> switched from generation 20 to 19

I think I have the beginning of an explanation. Could you show the
output of:

diff -u /var/guix/profiles/per-user/$USER/guix-profile-{19,20}-link

… where generation 20 is that created by ‘guix upgrade --dry-run’.

TIA,
Ludo’.
T
T
Tirifto wrote on 17 Jan 2022 17:45
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 53267@debbugs.gnu.org)
20220117174535.34b67e9f@Jado
On Mon, 17 Jan 2022 16:35:32 +0100
Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (2 lines)
> Hi,

Hello again!

Toggle quote (7 lines)
> I think I have the beginning of an explanation. Could you show the
> output of:
>
> diff -u /var/guix/profiles/per-user/$USER/guix-profile-{19,20}-link
>
> … where generation 20 is that created by ‘guix upgrade --dry-run’.

I have done another upgrade since, but I just made sure the problem
persists even there, or at least this is what happened…

$ guix package --rollback
switched from generation 21 to 20

$ guix upgrade --dry-run
The following packages would be upgraded:
gimp (dependencies or package changed)
ungoogled-chromium (dependencies or package changed)
youtube-dl (dependencies or package changed)

$ guix package --rollback
switched from generation 21 to 20

…so I’m attaching the diff between generations 20 and 21 instead, with
no other changes to your command. Please find it in the file
‘guix-profile-diff.txt’, unless it got renamed along the way.

Toggle quote (3 lines)
> TIA,
> Ludo’.

Best of wishes
// Tirifto
T
T
Tirifto wrote on 17 Jan 2022 18:10
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 53267@debbugs.gnu.org)
20220117181049.43ba037c@Jado
On Mon, 17 Jan 2022 17:45:35 +0100
Tirifto <tirifto@posteo.cz> wrote:

Toggle quote (2 lines)
> I have done another upgrade since […]

Oh right, and here’s an up-to-date description:

$ guix describe
Generation 18 Jan 17 2022 15:59:23 (current)
guix b2f6b6f
branch: master
commit: b2f6b6f6b9df6bcc24794238e7e97357470af95d
L
L
Ludovic Courtès wrote on 19 Jan 2022 22:16
(name . Tirifto)(address . tirifto@posteo.cz)(address . 53267-done@debbugs.gnu.org)
87mtjra0k4.fsf@gnu.org
Hi,

Tirifto <tirifto@posteo.cz> skribis:

Toggle quote (19 lines)
> I have done another upgrade since, but I just made sure the problem
> persists even there, or at least this is what happened…
>
> $ guix package --rollback
> switched from generation 21 to 20
>
> $ guix upgrade --dry-run
> The following packages would be upgraded:
> gimp (dependencies or package changed)
> ungoogled-chromium (dependencies or package changed)
> youtube-dl (dependencies or package changed)
>
> $ guix package --rollback
> switched from generation 21 to 20
>
> …so I’m attaching the diff between generations 20 and 21 instead, with
> no other changes to your command. Please find it in the file
> ‘guix-profile-diff.txt’, unless it got renamed along the way.

That was an interesting corner case, fixed in
ccda88a07039c62d5d0bfde7fccef02ef3937ccf.

Thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 53267@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 53267
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch