[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete all previous derivations

From: zimoun
Subject: Re: Delete all previous derivations
Date: Fri, 20 May 2022 09:15:07 +0200


On Thu, 19 May 2022 at 21:14, Joey Dumont <> wrote:
> I was toying around the idea of having guix as a compatibility layer for an
> HPC software stack, similar to what Compute Canada had with nix before they
> switched to Gentoo (
> hence the weird setup. I am aware that the Guix HPC guys recently published
> a layer between modules and guix shell, which I find interesting.

I am missing why 2 stores (or more) are required for this compatibility

> It took a little while to try your command, as I built guix using Arch's
> package manager, which doesn't install pre-inst-env. Also, I built in a
> chroot, and pre-inst-env contains hard-coded references to the build
> directory. I guess I am a very weird user :)

It was a question. :-)  Thanks for the try and the report.

How do you do otherwise to have this multi-store setup?

> But even with that I still get the same errors. I don't want to keep the
> two stores simultaneously, I'm fine with fully destroying the old one
> (although I would be interested in knowing how to properly rollover from
> one store to another).

Sorry, but I am still missing what you want to achieve.

The store is a global cache mounted somewhere.  The daemon uses this
cache to create a symlinks forest and build some profiles.

Now, you create another cache and let the daemon points to it.
Therefore, the elements from the previous profiles refers to the first
cache location and thus they cannot be reachable.

You get this:

--8<---------------cut here---------------start------------->8---
guix pull: error: derivation `/cvmfs/'
has incorrect output `/cvmfs/',
should be `/cvmfs/
--8<---------------cut here---------------end--------------->8---

It means the profile, say ~/.config/current/guix, had been built using
the store located at ’’. Then, you reconfigure
the daemon to point to another location for the store

When you pull, the profile ~/.config/current/guix is expecting elements
in but they cannot be reachable since you
replaced the location of the cache without rewriting the information in
the profile.  Bang!

The question is: what do you want to achieve?  Why do you want this
various stores based on dates?

Maybe I am incorrect, but from my understanding,

 1. the store should always be mounted in the same location,
 2. ’guix gc’ is the only command for managing the store,
 3. if you want backup or snapshot of the store, then you should use
 another tool working with the volumes.

A poor man solution for what I understand to your issue could be:

 a) ’guix gc’ for cleaning the current store mounted at /
 b) copy the volume mounted at / to another volume
 c) mount this other volume to /

This way, the necessary elements are kept from one store/volume to the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]