From: Blake Shaw via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 64472@debbugs.gnu.org
Subject: bug#64472: guix pull --roll-back breaks guix
Date: Wed, 05 Jul 2023 17:21:23 +0700 [thread overview]
Message-ID: <c3d9e1e9-0865-4547-a648-a7aefd5c4042@reproduciblemedia.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]
Hiya Guix,
I just encountered a surprising bug.
I've been trying to get the [redacted] proprietary GPU drivers to work on my system (but this isnt particular to the issue at hand), and I "guix installed" the [redacted-module] package in my .guix-profile, to see if that would help me with the failed
$ modprobe [redacted]
that I was experiencing.
It didn't, so I decided to do what we do best: roll-back. But I accidentally ran
$ guix pull --roll-back
instead of
$ guix package --roll-back
This mistake should be trivial, fixable by running
$ guix pull --switch-generation=N
Where N is the "FROM" field of the roll-back message that guix displays following a successfull roll back.
But to my surprise an anomaly appeared in the "TO" field of the roll-back message:
$ guix pull --roll-back
building path(s) `/gnu/store/2s7a7h...gj23-profile`
switched from generation 86 to 0
Huh? Zero? It should have switched to 85. Weird, but np, let's just direct it to 85.
$ guix pull --switch-generation=85
-bash: /home/my-profile/.config/guix/current/bin/guix
So now it can't find guix. Visiting .config/guix/current/ it is empty except an etc dir and a manifest. so I use guix from the run directory to get back on track:
$ exec /run/current-system/profile/bin/guix --switch-generation=85
guix pull error: cannot switch to generation '85'
$ exec /run/current-system/profile/bin/guix --switch-generation=86
switched from generation 0 to 86
And then $HOME/.config/guix/current is back to normal and everything works fine. So I assume this was due to yesterday's guix gc --delete-generations=1d
But like, should this happen? Should we ever be rolling back to an empty "0" generation that doesn't even contain guix, and thus creates a pickle for those who don't have prior knowledge of how to get out of it? Should we limit gc --delete-generations to always keep a previous generation at hand, perhaps unless forced by some other flag, so that [in particular, new] users don't break their systems in the middle of the day and then have something to solve that encumbers their plans & work?
Happy hacking!
Blake
[-- Attachment #2: Type: text/html, Size: 2966 bytes --]
next reply other threads:[~2023-07-05 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 10:21 Blake Shaw via Bug reports for GNU Guix [this message]
2023-11-24 10:17 ` bug#64472: guix pull --roll-back breaks guix Simon Tournier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3d9e1e9-0865-4547-a648-a7aefd5c4042@reproduciblemedia.com \
--to=bug-guix@gnu.org \
--cc=64472@debbugs.gnu.org \
--cc=blake@reproduciblemedia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).