[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: protect generations
Re: protect generations
Tue, 14 Jan 2020 17:38:12 +0100
On Sun, 12 Jan 2020 at 15:57, Marco van Hulten <address@hidden> wrote:
> > On Sun, 5 Jan 2020 at 22:42, Marco van Hulten <address@hidden> wrote:
> > > One of the great features of Guix is that one can roll back his
> > > profile. But I did a garbage collection (gc) that was too aggressive
> > > such that a relevant old profile disappeared. I presume this is gone
> > > forever.
> > From my understanding, yes gone but not necessary forever.
> > How did you instantiate the profile? Using a manifest file? Did the
> > profile use only one Guix commit or several?
> > How aggressive it was? What did you run?
> I have never used manifest files but usually use the imperative method
> of 'guix package -i ... -r ... -u' or sometimes I change to another
> "live" profile.
You should be interested to read this entry:
> > > Is it possible to lock certain generations (of certain users) such that
> > > 'guix gc' would not touch it?
> > Interesting whislist.
> In retrospect, a realisation of this wish would probably introduce
> unnecessary complexity of 'guix gc'. So nevermind. :-)
No, it appears to me interesting. :-)
For example, let consider this scenario:
guix package --install list of packages # (1)
guix package -i other ones -r some # (2)
guix package --upgrade # (3)
guix package -i again -r bye bye # (4)
guix package --roll-back # (5)
guix package -i kikoo # (6)
Now, the profile at the generation (6) is fine and you want to garbage
collect all the previous generations. But you know that the generation
(2) was ok. To my knowledge, it is not easy to GC the generations 1,
3, 4, 5 without collecting the 2.
Well, so we can imagine something like:
guix gc --lock=2
and now if you roll-back from 6, you obtain the profile of the generation 2.
I am not sure to be clear. :-)
But it is an interesting whishlist.
> Are 'generations' and 'profiles' not basically the same thing?
You can try:
guix package --list-generations
You will see all the transactions for the default profile ~/.guix-profile.
Well, the profile is what lives in ~/.guix-profile. Each time you do a
transaction (install/remove/upgrade), you alter this directory and
this modification is a generation.
Using a Git analogy, the generations corresponds to the commits and
the profile corresponds to the files.
> Instead of trying to restore the removed generation/profile, I try to
> fix the issue that I'm experiencing in newer generations. I might ask
> about this in a new thread if I cannot figure it out.
All the best,
Re: protect generations, Marius Bakke, 2020/01/11