bug-guix
[Top][All Lists]
Advanced

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

Re: Toward 0.2


From: Mark H Weaver
Subject: Re: Toward 0.2
Date: Tue, 26 Feb 2013 11:51:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Nikita Karetnikov <address@hidden> writes:

> I'm attaching a patch.
>
> It's a separate file; if I add these lines
>
>    #:use-module (guix packages)
>    #:use-module (guix store)
>
> to 'guix/build/utils.scm', they will raise the following error on
> 'make'.

Based on the backtrace below, it looks like you tried to add those to
guix/utils.scm, not guix/build/utils.scm.  It failed because it resulted
in a circular dependency between modules.

  (guix utils) -> (guix packages) -> (guix derivations) -> (guix utils)

Circular dependencies are not always fatal in Guile, but they can be
when one of the modules depends on a *macro* from another module in the
cycle.  In this case, (guix derivations) uses the 'memoize' macro from
(guix utils).

[Adds to Guile TODO list: better error messages in cases like this]

> Also, 'bin-location' and 'chmod' are not safe.  It can be solved with
> 'file-exists?'

I don't know what the issue is here (and don't have time now to figure
it out), but the idea that 'file-exists?' can make anything safe is
setting off warning bells in my head, because it sounds like a
TOCTTOU[1] race condition: someone else may change the filesystem
between your 'file-exists?' check and whatever you do that depends on
that check for safety.

     Regards,
       Mark

[1] http://en.wikipedia.org/wiki/Time-of-check-to-time-of-use



reply via email to

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