unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Marco van Hulten <marco@hulten.org>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: protect generations
Date: Tue, 14 Jan 2020 17:38:12 +0100	[thread overview]
Message-ID: <CAJ3okZ3=CCEvE-4iqo2g3yQfz5L22MHxqpb_jXQvGCR+9QB0GA@mail.gmail.com> (raw)
In-Reply-To: <20200112155722.00f6010a@jasniac.instanton>

Hi,

On Sun, 12 Jan 2020 at 15:57, Marco van Hulten <marco@hulten.org> wrote:


> > On Sun, 5 Jan 2020 at 22:42, Marco van Hulten <marco@hulten.org> 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:

http://guix.gnu.org/cookbook/en/guix-cookbook.html#Guix-Profiles-in-Practice


> > > 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)
etc.

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
   guix gc

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.

Please. :-)


All the best,
simon

  reply	other threads:[~2020-01-14 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-05 21:42 protect generations Marco van Hulten
2020-01-07 12:11 ` zimoun
2020-01-12 14:57   ` Marco van Hulten
2020-01-14 16:38     ` zimoun [this message]
2020-01-15  8:38       ` Efraim Flashner
2020-01-15 10:54         ` zimoun
2020-01-11 23:50 ` Marius Bakke

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='CAJ3okZ3=CCEvE-4iqo2g3yQfz5L22MHxqpb_jXQvGCR+9QB0GA@mail.gmail.com' \
    --to=zimon.toutoune@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=marco@hulten.org \
    /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.
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).