guix-devel
[Top][All Lists]
Advanced

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

Re: RFC: writable private scratch XDG_CACHE_HOME in build enviroment?


From: Andy Wingo
Subject: Re: RFC: writable private scratch XDG_CACHE_HOME in build enviroment?
Date: Tue, 21 Feb 2017 14:44:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi :)

On Tue 21 Feb 2017 13:13, Mathieu Lirzin <address@hidden> writes:

> IIUC the problem you have is that in a Guix build environmnent, Guile
> tries but *fails* to autocompile ".scm" files because it doesn't find
> any directory that it can write on?

Correct.

> Since /tmp is writeable in a Guix build environment and in most POSIX
> systems (I guess), Would it make sense for Guile itself to fallback to
> /tmp for its compilation cache?

It's possible.  It's a bit gnarly though:

  * you get the usual race conditions between users and /tmp that you
    have to mitigate

  * you have to be more careful about permissions (it could be that the
    .go embeds something secret)
    - each user would have to have their own path here

  * guile would have to look in /tmp in addition to XDG_CACHE_HOME when
    looking for autocompiled files

  * what if the one in /tmp is fresh but the one in XDG_CACHE_HOME is
    not, or vice versa?

I'd rather use XDG_CACHE_HOME for this as it's already well specified
and actually not Guile-specific
(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).

Andy



reply via email to

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