From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: protect generations Date: Tue, 14 Jan 2020 17:38:12 +0100 Message-ID: References: <20200105224236.2e4fb9c2@jasniac.instanton> <20200112155722.00f6010a@jasniac.instanton> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59889) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1irPCz-0001Dm-Sf for help-guix@gnu.org; Tue, 14 Jan 2020 11:38:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1irPCy-0000of-Mb for help-guix@gnu.org; Tue, 14 Jan 2020 11:38:25 -0500 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]:43163) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1irPCy-0000nt-IL for help-guix@gnu.org; Tue, 14 Jan 2020 11:38:24 -0500 Received: by mail-qk1-x72f.google.com with SMTP id t129so12661507qke.10 for ; Tue, 14 Jan 2020 08:38:24 -0800 (PST) In-Reply-To: <20200112155722.00f6010a@jasniac.instanton> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Marco van Hulten Cc: help-guix Hi, On Sun, 12 Jan 2020 at 15:57, Marco van Hulten wrote: > > On Sun, 5 Jan 2020 at 22:42, Marco van Hulten 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